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

chore: Update Swap Slippage v1 API for getting the Swap Quote #1248

Merged
merged 4 commits into from
Sep 12, 2024

Conversation

cpcramer
Copy link
Contributor

@cpcramer cpcramer commented Sep 12, 2024

What changed? Why?
Adjust slippage for V1 API (aggregator). V1 expects slippage in tenths of a percent (e.g., 30 = 3%). This was implemented when creating the transaction but not when fetching the quote

Notes to reviewers

How has it been tested?

Copy link

vercel bot commented Sep 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 8:06pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 8:06pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 8:06pm

@cpcramer cpcramer changed the title fix swap slipage quote chore: Update Swap Slippage v1 API for getting the Swap Quote Sep 12, 2024
apiParams = {
slippagePercentage: params.maxSlippage,
slippagePercentage: slippagePercentage,
...apiParams,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

if we need this logic in a 3rd place, we should extract to a utility

Copy link
Contributor

Choose a reason for hiding this comment

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

agreed

@cpcramer cpcramer merged commit 95acc71 into main Sep 12, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants