Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Not enough native balance, token ETH, chain id <chainId>" Toast shown when insufficient ETH to cover the fee on send page #21253

Open
VolodLytvynenko opened this issue Sep 11, 2024 · 8 comments
Labels
bug low-prio wallet: Send all issues for the send page of the wallet
Milestone

Comments

@VolodLytvynenko
Copy link
Contributor

VolodLytvynenko commented Sep 11, 2024

Follow up for #21235

Steps:

  1. Go to the transaction confirmation page.
  2. Enter the valid amount of ERC-20 requiring ETH to cover the fee.
  3. Ensure the ETH balance is insufficient to cover the transaction fee.

Actual Result:

A toast message is displayed: "Not enough native balance, token ETH, chain id ."

image

Expected Result:

The toast message is not shown

Devices:

  • Pixel 7a, Android 13
  • iPhone 11 Pro Max, IOS 17
@VolodLytvynenko VolodLytvynenko added this to the 2.31.0 Beta milestone Sep 11, 2024
@VolodLytvynenko VolodLytvynenko added the wallet: Send all issues for the send page of the wallet label Sep 11, 2024
@clauxx
Copy link
Member

clauxx commented Sep 18, 2024

@VolodLytvynenko @shivekkhurana so here we should just hide the toast for this error? What should we do in case of other router errors i.e. which ones we should show and which ones ignore? e.g.

"not enough token balance, token: %s, chainId: %d"                                   
"not enough native balance, token: %s, chainId: %d"                                  
"native token not found"                                                             
"token not found"                                                                    
"no best route found"                                                               
"cannot check balance"                                                               
"bonder fee greater than estimated received, a higher amount is needed to cover fees"
"no positive balance"                                                                

@VolodLytvynenko
Copy link
Contributor Author

VolodLytvynenko commented Sep 18, 2024

@xAlisher, could you take a look at this question? Perhaps some additional validation should be added in the Figma.

Currently, we only have a Figma design for:
'Not enough native balance, token: %s, chainId: %d' — Figma link.

I believe the case 'No positive balance' is impossible to reach on the client.

For other cases:

'Not enough token balance, token: %s, chainId: %d'
'Native token not found'
'Token not found'
'No best route found'
'Cannot check balance'
'Bonder fee greater than estimated received, a higher amount is needed to cover fees'

should we just show something went wrong as described here ?

@VolodLytvynenko
Copy link
Contributor Author

VolodLytvynenko commented Sep 19, 2024

@clauxx Could you please provide a more detailed explanation of the validations and correct me if I'm misunderstanding anything:

  1. 'Native token not found' – Does this occur if the user selects a token that is not supported by the network and tries to send it using that network? if so, this feature is handled in our app

  2. 'Token not found' – (Could you clarify in which cases it can occur?)

  3. 'No best route found' – I believe in this case we should attempt to find another available network. (In my opinion, we should leave this toast If this happens)

  4. 'Cannot check balance' – (Could you clarify in which cases it can occur?)

  5. 'Bonder fee greater than estimated received, a higher amount is needed to cover fees' – This occurs when the transaction amount is less than the required fee to cover the transaction. For example, to send 0.000001 ETH from L1 to L2, the user would need to pay 0.000002 ETH in fees. I believe we should have additional design for this case

cc: @xAlisher

@clauxx
Copy link
Member

clauxx commented Sep 19, 2024

@clauxx Could you please provide a more detailed explanation of the validations and correct me if I'm misunderstanding anything:

1. 'Native token not found' – Does this occur if the user selects a token that is not supported by the network and tries to send it using that network? if so, this feature is handled in our app

2. 'Token not found' – (Could you clarify in which cases it can occur?)

3. 'No best route found' – I believe in this case we should attempt to find another available network. (In my opinion, we should leave this toast If this happens)

4. 'Cannot check balance' – (Could you clarify in which cases it can occur?)

5. 'Bonder fee greater than estimated received, a higher amount is needed to cover fees' – This occurs when the transaction amount is less than the required fee to cover the transaction. For example, to send 0.000001 ETH from L1 to L2, the user would need to pay 0.000002 ETH in fees. I believe we should have additional design for this case

cc: @xAlisher

  1. I've been getting this error randomly sometimes and there's already an issue for it
  2. not sure about this one either
  3. sure, can keep it
  4. the error is returned here, but it looks like it will never be returned, so no idea why it's even there
  5. 👍

@clauxx
Copy link
Member

clauxx commented Sep 19, 2024

should we just show something went wrong as described here ?

@VolodLytvynenko @xAlisher yeah I think this would be best. I don't see any toasts error toast in the design, we just show "No routes found" and "Try again" button, so I think it would make sense to not show error toasts in the send modal at all. WDYT?

@churik
Copy link
Member

churik commented Sep 19, 2024

@VolodLytvynenko @xAlisher @clauxx
I think it is not wrong that we show this error, the wording is not best, but it is a way clearer than "Something went wrong"

I'd suggest to postpone the handling of toast error, wdyt?

@VolodLytvynenko
Copy link
Contributor Author

@VolodLytvynenko @xAlisher @clauxx I think it is not wrong that we show this error, the wording is not best, but it is a way clearer than "Something went wrong"

I'd suggest to postpone the handling of toast error, wdyt?

Agree with @churik . A few toast with errors will disappear after implementing new sending flow

@churik churik removed this from the 2.31.0 Beta milestone Sep 19, 2024
@clauxx clauxx removed their assignment Sep 20, 2024
@clauxx
Copy link
Member

clauxx commented Sep 20, 2024

sounds good to me 👍

@shivekkhurana shivekkhurana added this to the 2.31.0 Beta milestone Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug low-prio wallet: Send all issues for the send page of the wallet
Projects
Status: No status
Development

No branches or pull requests

4 participants