safe-wallet-web icon indicating copy to clipboard operation
safe-wallet-web copied to clipboard

Improve cleanup of pending transactions state

Open usame-algan opened this issue 6 months ago • 1 comments

Bug description

A pending transaction state is cleaned up whenever one of the following transaction events are emitted:

TxEvent.SIGNATURE_INDEXED | TxEvent.SUCCESS | TxEvent.REVERTED | TxEvent.FAILED

As long as there is still a pending transaction we don't allow users to execute another transaction. There are reports that users end up in this state even though there is seemingly no pending transaction.

We should implement a more robust way of cleaning up this state instead of only relying on events that are emitted if the app is opened and the tx watcher is running.

Steps to reproduce

Need to figure out steps to reproduce this. Simply submitting a transaction and closing the app doesn't work because as soon as the app is reopened, we start the watcher based on the pending tx state and the watcher emits those events.

Expected result

If there is no pending transaction in the queue there should also be no pending transaction in the local storage

Obtained result

Transaction is executed but the pending transaction state is still there

usame-algan avatar Aug 01 '24 12:08 usame-algan