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

Move approval check to fetch_quote_data #388

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

0xh3rman
Copy link
Collaborator

@0xh3rman 0xh3rman commented Jan 27, 2025

Fixes #385 , this is a breaking change:

  1. Remove approval from fetch_quote response SwapQuote
  2. Add a separate fetch_permit2_for_quote method to return data for Permit2 signature
  3. Add approval: ApprovalType field for SwapQuoteData from fetch_quote_data

The client needs to handle 2 approvals properly, flow:

  1. fetch quote
  2. fetch permit2 data
  3. sign permit2 sig and fetch tx data
  4. handle 2 txs

@0xh3rman 0xh3rman marked this pull request as draft January 27, 2025 09:10
Copy link
Contributor

@gemcoder21 gemcoder21 left a comment

Choose a reason for hiding this comment

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

Nice

gemstone/src/swapper/models.rs Outdated Show resolved Hide resolved
@0xh3rman 0xh3rman marked this pull request as ready for review January 29, 2025 01:21
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.

Implement approval + swap in one quote data
2 participants