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

fix: minimum amounts #4178

Merged
merged 1 commit into from
Apr 3, 2023
Merged

fix: minimum amounts #4178

merged 1 commit into from
Apr 3, 2023

Conversation

0xApotheosis
Copy link
Contributor

@0xApotheosis 0xApotheosis commented Apr 3, 2023

Description

We deprecated minimum in favour of minimumCryptoHuman at some point, but never updated web to match.

This is causing minimum amount issues for quotes in the swapper.

This PR fixes updates all instances of minimum to minimumCryptoHuman, fixing the minimum amount issues we are having (particularly for CoW Swap).

Notice

  • Have you followed the guidelines in our Contributing guide?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

N/A - prod bug

Risk

Small.

Testing

Enter a small amount for a CoW swap quote and see that it now correctly prevents the user from proceeding.

Engineering

☝️

Operations

☝️

Screenshots (if applicable)

Screenshot 2023-04-03 at 5 02 50 pm

@0xApotheosis 0xApotheosis requested a review from a team as a code owner April 3, 2023 07:02
@0xApotheosis 0xApotheosis mentioned this pull request Apr 3, 2023
5 tasks
@0xApotheosis
Copy link
Contributor Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

gomesalexandre
gomesalexandre previously approved these changes Apr 3, 2023
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally:

Less than minimum amount

image

Amount greater than the minimum amount

image

Looks good to me as far as the preview button flow goes, though the swapper selection still shows "Insufficient sell amount". Given that one is currently still flagged off on prod, this isn't a blocker but we should make sure to reflect the same minimum in the swapper selection UI before we turn the flag on

Base automatically changed from 04-03-fix_0_is_truthy_ to develop April 3, 2023 09:38
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sanity re-tested after lib bump:

image

image

image

in.gif

@gomesalexandre gomesalexandre merged commit 9e92de3 into develop Apr 3, 2023
@gomesalexandre gomesalexandre deleted the 04-03-fix_minimum_amounts branch April 3, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants