bitbox-wallet-app
bitbox-wallet-app copied to clipboard
Better error message for insufficient funds / gas on ERC-20 transfer.
BitBox App gives an error when wallet does not have enough funds for ERC-20 gas. However the error message starts with "Ein unbekannter Fehler ist aufgetreten" which might be confusing for users.
@Beerosagos once made a fix for that:
https://github.com/digitalbitbox/bitbox-wallet-app/blob/0f7362d2c854f2971bd9ddb0af2956cf5d7214de/backend/coins/eth/etherscan/etherscan.go#L47
https://github.com/digitalbitbox/bitbox-wallet-app/blob/master/backend/coins/btc/handlers/handlers.go#L407-L410
@Beerosagos maybe it's cause the error string is checked for equality, but the EtherScan err msg has more stuff in it? Here we use string.Contains
instead:
https://github.com/digitalbitbox/bitbox-wallet-app/blob/0f7362d2c854f2971bd9ddb0af2956cf5d7214de/backend/coins/eth/account.go#L575
Beerosagos once made a fix for that:
Yeah, it seems like etherscan error text is more detailed now and the strict comparison fails. Opened a PR to fix it: https://github.com/digitalbitbox/bitbox-wallet-app/pull/2607
PR merged, closing