-
Notifications
You must be signed in to change notification settings - Fork 23
Feature/max one click transfer #1799
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
base: v2
Are you sure you want to change the base?
Conversation
…/one-click-transfer-reserve-for-fee
| if (userRequest && userRequest.action.kind === 'calls') { | ||
| this.signAccountOpController.accountOp.calls = userRequest.action.calls | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need the else logic? op.calls already holds the transaction, doesn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're updating the calls depending on the chosen fee token. If the first case is "send max USDT and pay in USDT", we will perform the "if" calculation. But if the user then changes to another fee option instead, we enter the "else" and allow the user to send the full max USDT he has. Otherwise, he would have sent the subtracted value
…/one-click-transfer-reserve-for-fee
Description: https://github.com/AmbireTech/ambire-app/pull/5573