You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in fee calculation when clicking on the Max button for ETH on swaps.
Actual behavior
The Max button fills the send field with all available ETH. This leaves no ETH to pay gas, leading to an error.
Expected behavior
The Max button fills the send field with "total eth - max gas fee" instead of all ETH. Max gas fee changes on a fixed interval, and the backend emits and event when the change happens.
For the sake of UX, let's not update the from field after it has been computed once
Reproduction
Click on the Max button for ETH on swaps.
Observe the error "not enough ETH for fees".
Acceptance criteria
On pressing Max button while swapping from ETH, the from field of the swap should be filled with available ETH - max gas fee
The second token can be defaulted to USDT
This change should not affect any other token
When a new quote is received for updated max gas fee, we don't change ETH in from field, and this might run into ''not enough gas error" - we accept this risk.
Additional Information
Status version: nightly
Operating System: Android, iOS
The text was updated successfully, but these errors were encountered:
Had a call with Mohsen and we decide on a slighly updated flow:
1- If the user selects Eth for sending, we fetch the current send fee, and then the max button shows available-fee.
2- Until the fee is being fetched, there is no max button, only a skeleton.
If this is too hard, we'll hide the max button for Ethereum. In that case, this ticket will need a rewrite.
@shivekkhurana As I checked The fee comes with swap proposal details, and we will have this data once user enter some amount. so in initial state as we don't have fee before user enter any amount, then displaying max balance doesn't make sense for ETH.
for this ticket i'm going to hide Max button for Ethereum, until we have fee. please let me know if you have any other suggestion.
Problem
There is a bug in fee calculation when clicking on the Max button for ETH on swaps.
Actual behavior
The Max button fills the send field with all available ETH. This leaves no ETH to pay gas, leading to an error.
Expected behavior
The Max button fills the send field with "total eth - max gas fee" instead of all ETH. Max gas fee changes on a fixed interval, and the backend emits and event when the change happens.
For the sake of UX, let's not update the from field after it has been computed once
Reproduction
Acceptance criteria
Additional Information
The text was updated successfully, but these errors were encountered: