KomodoPlatform / atomicDEX

This is the official AtomicDEX mobile (smartphone app) repository
https://atomicdex.io
GNU General Public License v2.0
10 stars 15 forks source link

Pressing "unlock funds" button on a unrecoverable swap involving ETH/ERC-20 repeatedly, spends gas fees repeatedly #163

Open gcharang opened 4 years ago

gcharang commented 4 years ago

This may be an edge case that occurred because of a bug in AtomicdEX-API/(smart contract code), but I think every button press that costs something should report the cost before the button is pressed. or at least ask for a confirmation before the action is performed.

In this particular case, the swap involved ETH and was stuck(unrecoverable) failed-eth-swap

As the user didn't know that the swap was unrecoverable, and unaware of the gas cost of trying to recover the coins, he tried to unlock the funds many times and wasted a lot of gas fees gas-wasted-1 gas-wasted-2

maybe we can keep track of gas spent to unlock coins already and display that?