Skip to content

Conversation

@pradel
Copy link

@pradel pradel commented Jul 29, 2025

The useQuote hook sometimes errors with the "No route found" error; usually, just retrying to get a quote will give a valid one after the error. To improve the experience of our users we need a way to automatically retry to get a quote before showing an error to the user.
This can be achieved if we can pass the retry options to react-query for the useQuote hook to prevent such errors from happening. Lmk your thoughts on the approach, thanks.

@changeset-bot
Copy link

changeset-bot bot commented Jul 29, 2025

🦋 Changeset detected

Latest commit: a1f8a97

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@reservoir0x/relay-kit-hooks Minor
@reservoir0x/relay-kit-ui Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jul 29, 2025

@pradel is attempting to deploy a commit to the Uneven Labs Team on Vercel.

A member of the Team first needs to authorize it.

@ted-palmer
Copy link
Collaborator

The useQuote hook sometimes errors with the "No route found" error; usually, just retrying to get a quote will give a valid one after the error. To improve the experience of our users we need a way to automatically retry to get a quote before showing an error to the user. This can be achieved if we can pass the retry options to react-query for the useQuote hook to prevent such errors from happening. Lmk your thoughts on the approach, thanks.

Are you passing a referrer to the quote api? It's possible that you are getting rate limited

@pradel
Copy link
Author

pradel commented Jul 29, 2025

I can try this. How can we set the referrer for the SwapModule? This is how we set up the Relay provider, and there is no referrer prop on SwapModule

<RelayKitProvider
      theme={theme}
      options={{
        appName: "fxhash",
        source: "fxhash",
        chains: relayChains,
        baseApiUrl: relayBaseApiUrl,
      }}
    >
      {children}
    </RelayKitProvider>

@ted-palmer
Copy link
Collaborator

The source prop in the RelayKitProvider is the referrer. Do you have any examples of routes where you are seeing this issue?

@pradel
Copy link
Author

pradel commented Jul 29, 2025

An example of a route with issues:

  • $FXH 0x5fc2843838e65eb0b5d33654628f446d54602791
  • $SYMPHONY 0xe6eF81AB6373b7B0D79bD8986D6d3596Cb5386F9

@ted-palmer
Copy link
Collaborator

It appears that there is just low liquidity with this specific route, causing the quote to be unreliable. I have pinged our backend team about this and will let you know if I get any updates

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.

2 participants