New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add change output to wallet balance immediately #8073
Comments
@woodser but it wouldn't really be an accurate reflection of things would it? What if the transaction failed for some reason? Then there needs to be additional code to remove the amount that was incorrectly added to the balance. There are other reasons to prefer the way things are here, as well. A user should not be alarmed at the wallet working as intended. |
@notmike-5 Currently the outgoing amount is deducted from the wallet balance immediately and re-added if the transaction fails. Unconfirmed payments are also credited to the balance immediately with this PR merged to master. This issue goes along the same line of thinking, requesting that the change output be treated equal to the other incoming and outgoing amounts. Otherwise, why treat it differently? Doing so creates an incorrect balance whether the transaction fails or not. |
Also, the user's balance reducing by more than they sent is an alarming part of the experience. Adding change at the same time as subtracting the withdraw fixes that. |
If I'm not mistaken, unconfirmed change is already credited to the balance immediately: https://github.com/woodser/monero/blob/67be0552e769a8322fc92afa5cbc187216f2b8f7/src/wallet/wallet2.cpp#L6045 I opened a PR to also credit unconfirmed transfers back to the same wallet immediately: #8158 When used with #6986, the unconfirmed balance should be correct with unconfirmed transfers and change. |
@woodser if you want something in the next release please also open it against release branch |
When a user spends XMR, their wallet spends outputs and creates a change output.
Currently, the wallet does not add the change output to the wallet's balance until confirmed.
As a result, the balance decreases by more than the amount spent, which is alarming to users.
This issue requests that the wallet adds the change output into its balance immediately so only the spend amount is deducted from the balance.
The text was updated successfully, but these errors were encountered: