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

Swap button enabled and approval not shown after account switch on swap page #21441

Open
VolodLytvynenko opened this issue Oct 15, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@VolodLytvynenko
Copy link
Contributor

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 than Account 1.
  1. Go to the swap page using Account 1.
  2. Enter a valid value that is sufficient for Account 1 but insufficient for Account 2.
  3. 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.
swap2.mp4

Expected Result:

  • The "Review Swap" button should be disabled after switching to an account with insufficient assets.
  • The approval button should be displayed for Account 2 to allow the user to approve the ERC-20 token before swap proceeding.

ENV:

Nightly 15 Oct 2024

@VolodLytvynenko VolodLytvynenko added this to the 2.32.0 Beta milestone Oct 15, 2024
@briansztamfater briansztamfater self-assigned this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

2 participants