Open mohamedamer453 opened 2 years ago
When the transaction is batched, it can't be cancelled. The relayer (a process running per each validator), polls the pending requests and batches them periodically. So in this case the relayer batched the request before the cancel transaction is submitted. This can't be totally prevented since it's just a race between the frontend and the relayer. It should be improved by:
The error is shown here and more validations are done in https://github.com/threefoldtech/threefold_hub/pull/73, and deployed on https://threefoldhub.test.gridtesting.xyz/.
Starting with 28 TFT on Metamask & 15.9 TFT on Keplr
I Completed a transaction with a total of 5.911728
TFT
then i immediately went to the pending transactions tab and then to the unbatched tab and deleted the transaction (all this in approx. < 10 seconds)
after that the after that the Balance on metamask was still 28 TFT and on Keplr 14.4 TFT
so i think the 1.5 TFT difference is cancellation fees and the transaction was cancelled ?
Also in another transaction i did the exact same steps but i waited a couple of seconds after i approved the transaction before deleting it from the unbatched tab and i got an error message.
so i think that it's working now but the error message needs to be simplified and the position of the message needs to be adjusted.
Tested on https://threefoldhub.test.gridtesting.xyz/
After completing a transaction from cosmos to bsc and trying to delete it while it's still unbatched i was not able to delete it even though i approved the request from keplr and the transactions was completed and i received the tokens back at my metamask wallet.
Starting with 58 TFT in my metamask wallet and 12 available TFT in keplr.
after completing the transaction with a total of 8 TFT
and approving the transaction from keplr
after navigating to pending BSC transactions then to the unbatched tab i clicked in the delete icon and approved the action from keplr
but after a while it was transferred to the batched tab
and the transaction was completed and the TFT sent to metamask.