After switching from Account 1 (which has enough assets and approved ERC-20 tokens) to Account 2 (which has fewer assets and non-approved ERC-20 tokens), the "Review Swap" button remains enabled, and the user can proceed to the confirmation page, even though Account 2 does not have enough assets to complete the transaction. Additionally, the approval button is not displayed for Account 2, despite the ERC-20 token being unapproved.
Steps:
1, Recover a user with two accounts:
Account 1 has an approved ERC-20 token.
Account 2 has an unapproved ERC-20 token and fewer assets than Account 1.
Go to the swap page using Account 1.
Enter a valid value that is sufficient for Account 1 but insufficient for Account 2.
Switch to Account 2.
Actual Result:
The "Review Swap" button remains enabled, and the user can proceed to the confirmation page despite insufficient assets in Account 2.
The approval button is missing for Account 2, even though the ERC-20 token is unapproved.
Problem:
After switching from Account 1 (which has enough assets and approved ERC-20 tokens) to Account 2 (which has fewer assets and non-approved ERC-20 tokens), the "Review Swap" button remains enabled, and the user can proceed to the confirmation page, even though Account 2 does not have enough assets to complete the transaction. Additionally, the approval button is not displayed for Account 2, despite the ERC-20 token being unapproved.
Steps:
1, Recover a user with two accounts:
Account 1
has an approved ERC-20 token.Account 2
has an unapproved ERC-20 token and fewer assets thanAccount 1
.Account 1
.Account 1
but insufficient forAccount 2
.Account 2
.Actual Result:
Account 2
.approval
button is missing forAccount 2
, even though the ERC-20 token is unapproved.https://github.com/user-attachments/assets/057b5779-6608-4eb1-8362-17f73b973c45
Expected Result:
Account 2
to allow the user to approve the ERC-20 token before swap proceeding.ENV:
Nightly 15 Oct 2024