coinbase / onchainkit

React components and TypeScript utilities to help you build top-tier onchain apps.
https://onchainkit.xyz
MIT License
511 stars 114 forks source link

Feature Request: TransactionStatusLabel should show user friendly message for the common error cases/codes #962

Open dry-tortuga opened 1 month ago

dry-tortuga commented 1 month ago

Describe the solution you'd like

Right now, the TransactionStatusLabel and TransactionStatusAction components display the text "Something went wrong. Please try again." regardless of the type of error encountered.

It would be nice if it could be updated to automatically handle common error cases/codes, such as this error message when the account does not have enough ETH to cover the expected cost of gas + value for the transaction:

Screenshot from 2024-07-31 15-06-35

There's probably others too I'll run into as I use this more!

Describe alternatives you've considered.

No response

dry-tortuga commented 1 month ago

I just noticed that I only get this behavior using a non-smart wallet, i.e. Coinbase browser extension...

The smart wallet has that user friendly error message built-in!

Zizzamia commented 1 month ago

Thank you for pointing this out. We will take a look on this.