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

Add backend provided slippage #5649

Merged
merged 3 commits into from Apr 23, 2024
Merged

Add backend provided slippage #5649

merged 3 commits into from Apr 23, 2024

Conversation

walmat
Copy link
Contributor

@walmat walmat commented Apr 22, 2024

Fixes APP-1357

What changed (plus any additional context for devs)

  • Adds a call to fetch the slippage if the user hasn't defined their own just before executing a swap.

Screen recordings / screenshots

What to test

Copy link

linear bot commented Apr 22, 2024

Copy link

socket-security bot commented Apr 22, 2024

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

Package New capabilities Transitives Size Publisher
npm/@rainbow-me/swaps@0.17.0 environment, eval, network +9 3.25 MB brunobar79

🚮 Removed packages: npm/@rainbow-me/swaps@0.16.0

View full report↗︎

/**
* NOTE: Before executing a swap, we want to check several things:
* 1. assetToSell && assetToBuy addresses match the quote values
* 2. outputNative matches quote value
Copy link
Contributor

Choose a reason for hiding this comment

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

this check makes sense but not sure if practical, like isnt there a case where the quote could update

Copy link
Contributor Author

Choose a reason for hiding this comment

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

outputNative is updated when the quote updates

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not a necessary check, but is more of a sanity check that the user is displayed and can confirm what will actually get received.

@skylarbarrera skylarbarrera merged commit d2aed6a into develop Apr 23, 2024
5 of 6 checks passed
@skylarbarrera skylarbarrera deleted the @matthew/APP-1357 branch April 23, 2024 15:50
BrodyHughes added a commit that referenced this pull request May 7, 2024
…eplink-add

* 'develop' of github.com:rainbow-me/rainbow:
  simplify logic for fee display (#5660)
  zustand: use smol subscriptions (#5661)
  useSyncSharedValue (#5662)
  handle wc links in browser (#5652)
  Add default error page (#5657)
  update firebase (#5636)
  browser: fix android card images (#5651)
  Add backend provided slippage (#5649)
  Add rainbow fee to review panel (#5650)
  review prompt changes (#5656)
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.

None yet

2 participants