Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Optimizes the usePrice hook by adding baseChainId validation to skip checking invalid canonical routes.

This PR:

  • Adds baseChainId to RelayChain type definition
  • Updates usePrice hook to skip checking routes where baseChainId relationships don't match
  • Improves performance by reducing unnecessary API calls
  • Maintains backward compatibility when baseChainId is not available

Link to Devin run: https://app.devin.ai/sessions/58e6c4af37664c9ca31226e12c2652d9

@devin-ai-integration devin-ai-integration bot added the enhancement New feature or request label Dec 16, 2024
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

@changeset-bot
Copy link

changeset-bot bot commented Dec 16, 2024

🦋 Changeset detected

Latest commit: ef5aba1

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 Patch
@reservoir0x/relay-kit-ui Patch

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
Contributor

vercel bot commented Dec 16, 2024

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

Name Status Preview Comments Updated (UTC)
relay-sdk-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 10:03pm

@pedromcunha pedromcunha force-pushed the devin/1734380438-optimize-price-hook branch from db663c4 to ef5aba1 Compare December 16, 2024 21:56
@pedromcunha pedromcunha merged commit 2652757 into main Dec 16, 2024
4 checks passed
@pedromcunha pedromcunha deleted the devin/1734380438-optimize-price-hook branch December 16, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants