grin-wallet icon indicating copy to clipboard operation
grin-wallet copied to clipboard

Canceling a transaction may result in an incorrect wallet balance

Open aglkm opened this issue 5 months ago • 0 comments

The wallet allows you to cancel a transaction that has been broadcasted to the network, but has not yet received any confirmation.

Let's imagine that you have an unspent output of 5 grin coins in your wallet. Steps to reproduce:

  1. grin-wallet send 0.1
  2. grin-wallet finalize
  3. grin-wallet cancel -i id
  4. wait for at least one confirmation of the transaction created in step 1.
  5. check your outputs and wallet balance

Now you have 2 outputs: 5 coins + 4.9 coins (a change output of the previous tx) and your wallet balance is 9.9 grin coins, which is incorrect.

You have to re-scan (grin-wallet scan) the wallet to fix the balance.

aglkm avatar Jul 08 '25 09:07 aglkm