graphprotocol / mission-control-curator

15 stars 58 forks source link

Check DAI balance before submitting transaction #117

Open makoto opened 3 years ago

makoto commented 3 years ago

My transaction to list new project failed due to lack of sufficient fund in DAI.

https://etherscan.io/tx/0x2a30f243c85b55a3a27f8e38a964d978fe5047bd5cbf6d03b4fb6a1774d7c5f9

The dapp should check the dai balance and warn users to avoid making such silly mistakes.

makoto commented 3 years ago

Similar to https://github.com/graphprotocol/mission-control-curator/issues/83 but it shouldn't even let users submit transaction as it is 100 % guarantied to fail.

thegezman commented 3 years ago

I agree with this, as it just happened to me. Was going to suggest it defaults to ETH instead of DAI - but a sainity check would be even better. I guess the challenge is it cant be sure what amount will or want fail as GAS prices are dynamic,