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: borked 0x pairs #5678

Closed
wants to merge 2 commits into from
Closed

fix: borked 0x pairs #5678

wants to merge 2 commits into from

Conversation

gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Nov 22, 2023

Description

Fixes (some) borked 0x pairs. For some reason, using the price endpoint with no validation to get a quote, then using the quote endpoint with validation is causing the latter (i.e the pre-broadcast quote) to respond with 400.

Fixed by consistently using the /quote endpoint, and consistently skipping validation - as our flow makes it so that by the time of <TradeConfirm />, we are already in a state where allowance is granted.

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)

closes #5598

Risk

  • 0x quotes could be broken, test you're still able to get 0x quotes against develop

Testing

  • 0x quotes are happy
  • XRP20 -> ETH using ZRX is happy at pre-broadcast quote time (ping myself or @MBMaria for the address to use in Frame)

Engineering

  • ☝🏽

Operations

  • ☝🏽

Screenshots (if applicable)

image

Copy link
Contributor Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@gomesalexandre gomesalexandre marked this pull request as ready for review November 22, 2023 10:16
@gomesalexandre gomesalexandre requested a review from a team as a code owner November 22, 2023 10:16
@@ -60,7 +60,7 @@ export async function getZrxTradeQuote(
}

const maybeZrxPriceResponse = await fetchFromZrx({
priceOrQuote: 'price',
priceOrQuote: 'quote',
Copy link
Contributor Author

@gomesalexandre gomesalexandre Nov 22, 2023

Choose a reason for hiding this comment

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

Note, we do not effectively use this anymore (we're always passing 'quote' now) but we may

@gomesalexandre
Copy link
Contributor Author

Closing as broadcasting this would revert anyway

image

@0xean 0xean deleted the fix_0x_swaps branch June 18, 2024 21:33
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.

Unable to trade out of XRP20 on ETH
1 participant