district0x/StreamTide

NSF error needs better error handling

Bradymck opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
Insufficient funds leads to a gas error, this needs to be the UI side and not sent to Metamask. it currently displays an error that should be in UI not metamask.
gas error

Describe the solution you'd like
This shouldld be displayed in the normal notification box and never show a transaction window.

Describe alternatives you've considered
Possibly sending a better error text to metamask if possible.
Additional context
To reproduce create a fresh account without ETH and try to donate to a creator.

@Bradymck this is a bit tricky, as we don't know (or is hard to know) the gas consumption a transaction is going to make. I mean, we can show an error message if you have 1 ETH and you want to make a donation of 2 ETH as this is obvious. But for example, imagine you have 1 ETH and you want to donate 0.995 ETH, then, depending on the gas price at that moment you might or might not have enough funds to make the transaction and it will be metamask the best one to know that.