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

Hook up minimum received and max sold values #5900

Merged
merged 4 commits into from
Jun 28, 2024
Merged

Conversation

jinchung
Copy link
Member

@jinchung jinchung commented Jun 27, 2024

Fixes APP-1620

What changed (plus any additional context for devs)

Issues solved:

  1. The minimum received value in the review panel was not hooked up correctly and always showed the same value as the output amount.
  2. The minimum received value always displayed, even for output-based trades (which should show the maximum sold amount instead.)
  3. Includes a version bump to swaps SDK v0.22.0

This PR will require some follow up after launch. We have a few updates that we want to do from the backend, so for now, the minimum received value is hooked up correctly (value after fees and slippage) but the maximum sold amount currently matches the input amount for output-based trades (the most pessimistic/conservative estimate we have.) We'll update this in a later release.

What to test

Test with a variety of input-based vs output-based trades.
Input-based trades should show "Minimum Received" in the review panel with a value that is less than the output amount.
Output-based trades should show "Maximum Sold" in the review panel with a value that matches in the input amount. (This will be updated later)

Screen recordings / screenshots

Simulator Screenshot - iPhone 15 Pro - 2024-06-28 at 07 12 11
Simulator Screenshot - iPhone 15 Pro - 2024-06-28 at 07 12 42
Simulator Screenshot - iPhone 15 Pro - 2024-06-28 at 07 13 03
Simulator Screenshot - iPhone 15 Pro - 2024-06-28 at 07 13 16
Simulator Screenshot - iPhone 15 Pro - 2024-06-28 at 07 14 10

Copy link

linear bot commented Jun 27, 2024

@jinchung jinchung marked this pull request as ready for review June 27, 2024 12:22
Copy link
Contributor

@benisgold benisgold left a comment

Choose a reason for hiding this comment

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

Simulator Screenshot - iPhone 15 Pro - 2024-06-27 at 09 09 44
Simulator Screenshot - iPhone 15 Pro - 2024-06-27 at 09 11 02

neither minimum received nor maximum sold appear to be working correctly. minimum received shows undefined as the amount, and maximum sold shows an incorrect amount that lacks formatting

@jinchung jinchung force-pushed the @jin/min-received branch from bc74481 to 7e3906c Compare June 27, 2024 22:18
@jinchung jinchung requested a review from walmat as a code owner June 27, 2024 22:18
Copy link

socket-security bot commented Jun 27, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@rainbow-me/[email protected] environment, eval, network +11 3.4 MB brunobar79

🚮 Removed packages: npm/@rainbow-me/[email protected]

View full report↗︎

@jinchung jinchung force-pushed the @jin/min-received branch from 7e3906c to 016aad9 Compare June 27, 2024 22:22
@jinchung jinchung requested a review from benisgold June 27, 2024 22:24
@brunobar79 brunobar79 merged commit 6221da9 into develop Jun 28, 2024
6 checks passed
@brunobar79 brunobar79 deleted the @jin/min-received branch June 28, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants