{"action":"created","issue":{"url":"https://api.github.com/repos/monero-project/monero/issues/4500","repository_url":"https://api.github.com/repos/monero-project/monero","labels_url":"https://api.github.com/repos/monero-project/monero/issues/4500/labels{/name}","comments_url":"https://api.github.com/repos/monero-project/monero/issues/4500/comments","events_url":"https://api.github.com/repos/monero-project/monero/issues/4500/events","html_url":"https://github.com/monero-project/monero/issues/4500","id":366941146,"node_id":"MDU6SXNzdWUzNjY5NDExNDY=","number":4500,"title":"monero-wallet-rpc returns incorrect balances and omits transactions when sending to/from the same account","user":{"login":"woodser","id":13068859,"node_id":"MDQ6VXNlcjEzMDY4ODU5","avatar_url":"https://avatars0.githubusercontent.com/u/13068859?v=4","gravatar_id":"","url":"https://api.github.com/users/woodser","html_url":"https://github.com/woodser","followers_url":"https://api.github.com/users/woodser/followers","following_url":"https://api.github.com/users/woodser/following{/other_user}","gists_url":"https://api.github.com/users/woodser/gists{/gist_id}","starred_url":"https://api.github.com/users/woodser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woodser/subscriptions","organizations_url":"https://api.github.com/users/woodser/orgs","repos_url":"https://api.github.com/users/woodser/repos","events_url":"https://api.github.com/users/woodser/events{/privacy}","received_events_url":"https://api.github.com/users/woodser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-10-04T19:42:38Z","updated_at":"2018-10-05T14:17:45Z","closed_at":null,"author_association":"NONE","body":"This issue may be reproduced by sending a transaction from account 0 to account 0 of the same wallet.\r\n\r\nBefore the transaction has confirmed:\r\n\r\n- `get_transfers` does not return the transaction which should be type \"pool\".\r\n- `get_accounts` and `get_balance` return incorrect balances.\r\n\r\nAfter the transaction has confirmed:\r\n\r\n- `get_accounts` and `get_balance` return the correct balances.\r\n- `get_transfers` does not return the transaction which should be type \"incoming\".\r\n\r\nSimilar results are seen if sending e.g. from account 1 to account 0."},"comment":{"url":"https://api.github.com/repos/monero-project/monero/issues/comments/427381512","html_url":"https://github.com/monero-project/monero/issues/4500#issuecomment-427381512","issue_url":"https://api.github.com/repos/monero-project/monero/issues/4500","id":427381512,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzM4MTUxMg==","user":{"login":"woodser","id":13068859,"node_id":"MDQ6VXNlcjEzMDY4ODU5","avatar_url":"https://avatars0.githubusercontent.com/u/13068859?v=4","gravatar_id":"","url":"https://api.github.com/users/woodser","html_url":"https://github.com/woodser","followers_url":"https://api.github.com/users/woodser/followers","following_url":"https://api.github.com/users/woodser/following{/other_user}","gists_url":"https://api.github.com/users/woodser/gists{/gist_id}","starred_url":"https://api.github.com/users/woodser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woodser/subscriptions","organizations_url":"https://api.github.com/users/woodser/orgs","repos_url":"https://api.github.com/users/woodser/repos","events_url":"https://api.github.com/users/woodser/events{/privacy}","received_events_url":"https://api.github.com/users/woodser/received_events","type":"User","site_admin":false},"created_at":"2018-10-05T14:17:45Z","updated_at":"2018-10-05T14:17:45Z","author_association":"NONE","body":"\r\nRegarding mempool transactions being reflected in the balance, I think the same logic should apply to both pending and mempool transactions since neither are guaranteed to confirm.  Otherwise, it creates a lopsided balance where only outgoing pending transactions are deducted.  Crediting the balance with unconfirmed transactions is more inline with user expectation/intuition that the balance increases when an incoming transaction is detected even if the funds are not immediately spendable, which the unlocked balance represents.  It is also consistent almost every other wallet."}}
{"actor":{"display_login":"woodser"}}