-
Notifications
You must be signed in to change notification settings - Fork 560
[SDK] Fix: Adds BuyWidget fallback when native isn't supported #7601
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
base: main
Are you sure you want to change the base?
[SDK] Fix: Adds BuyWidget fallback when native isn't supported #7601
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes update environment variable handling and error management in two areas: URL construction in a hook now defaults to a specific domain and protocol logic, while the BuyWidget component introduces explicit error catching and fallback for unsupported native tokens. No exported or public API signatures were altered. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant BuyWidget
participant getToken
User->>BuyWidget: Initiate bridgeDataQuery
BuyWidget->>getToken: Request native token info
alt Token supported
getToken-->>BuyWidget: Return token info
BuyWidget-->>User: Proceed with token data
else Token not supported
getToken-->>BuyWidget: Throw "not supported" error
BuyWidget-->>User: Return unsupported token object
else Other error
getToken-->>BuyWidget: Throw error
BuyWidget-->>User: Propagate error
end
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
✨ 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. |
Merge activity
|
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #7601 +/- ##
==========================================
- Coverage 56.45% 56.44% -0.01%
==========================================
Files 906 906
Lines 58115 58126 +11
Branches 4226 4228 +2
==========================================
+ Hits 32810 32811 +1
- Misses 25195 25205 +10
Partials 110 110
🚀 New features to boost your workflow:
|
7b58e5c
to
99cea8b
Compare
PR-Codex overview
This PR focuses on improving error handling and default values in the
BuyWidget
component and enhancing thefetchTokensFromApi
function by allowing a fallback for the bridge URL.Detailed summary
In
BuyWidget.tsx
:In
useTokensData.ts
:domain
infetchTokensFromApi
.Summary by CodeRabbit