-
Notifications
You must be signed in to change notification settings - Fork 543
[SDK] Optimize fiat conversion query #7242
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 3703fb8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
WalkthroughThe changes remove the contract bytecode existence validation from both crypto-to-fiat and fiat-to-crypto conversion functions and their associated tests. Imports related to this validation are deleted, and one changeset file documents the optimization. No changes are made to public APIs or function signatures. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant ConversionFunction
Caller->>ConversionFunction: convertCryptoToFiat(params) / convertFiatToCrypto(params)
ConversionFunction->>ConversionFunction: Validate EVM address
ConversionFunction->>ConversionFunction: Fetch token price
alt Price available
ConversionFunction-->>Caller: Return conversion result
else Price unavailable
ConversionFunction-->>Caller: Throw error
end
Possibly related PRs
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
💤 Files with no reviewable changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (8)
🔇 Additional comments (5)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
size-limit report 📦
|
PR-Codex overview
This PR focuses on optimizing the fiat conversion queries in the
thirdweb
package by removing unnecessary checks for contract addresses in theconvertFiatToCrypto
andconvertCryptoToFiat
functions, and cleaning up test cases.Detailed summary
.changeset/dark-dancers-hammer.md
to reflect optimization.ZERO_ADDRESS
fromfiatToCrypto.test.ts
andcryptoToFiat.test.ts
.fiatToCrypto
andcryptoToFiat
.convertFiatToCrypto
andconvertCryptoToFiat
functions.Summary by CodeRabbit