Skip to content

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Oct 7, 2025


PR-Codex overview

This PR focuses on enhancing the error handling in the BuyWidget and SwapWidget UIs by displaying error messages when fetching token details fails.

Detailed summary

  • Added isError state to various components to track errors in fetching token details.
  • Updated conditional rendering to display error messages in SelectedTokenButton, SwapUI, and FundWallet.
  • Improved error messaging for better user feedback.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features

    • Inline error banners in BuyWidget, SwapWidget, and Fund Wallet when token detail fetching fails.
    • Distinct error messages for quote preparation, buy-token, and sell-token fetch failures.
  • Improvements

    • Selected token UI falls back gracefully on errors instead of showing partial visuals.
    • Balance display now uses richer token info (value, decimals, symbol, name).
    • More consistent handling of unsupported tokens across the flow.
  • Bug Fixes

    • Prevents stale token icons/details during error states.
    • Disables auto-retry on token price fetches to reduce UI flicker.

Copy link

linear bot commented Oct 7, 2025

Copy link

changeset-bot bot commented Oct 7, 2025

🦋 Changeset detected

Latest commit: 62cfbb7

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

This PR includes changesets to release 4 packages
Name Type
thirdweb Patch
@thirdweb-dev/nebula Patch
@thirdweb-dev/wagmi-adapter Patch
wagmi-inapp 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

Copy link

vercel bot commented Oct 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Ready Preview Comment Oct 7, 2025 9:50pm
nebula Ready Ready Preview Comment Oct 7, 2025 9:50pm
thirdweb_playground Ready Ready Preview Comment Oct 7, 2025 9:50pm
thirdweb-www Ready Ready Preview Comment Oct 7, 2025 9:50pm
wallet-ui Ready Ready Preview Comment Oct 7, 2025 9:50pm

@MananTank MananTank marked this pull request as ready for review October 7, 2025 19:14
@MananTank MananTank requested review from a team as code owners October 7, 2025 19:14
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Oct 7, 2025
Copy link
Member Author

MananTank commented Oct 7, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Walkthrough

Adds explicit error propagation for token detail/price fetches across Bridge UI components. Selected token objects gain an isError flag, balance shape is expanded, SwapWidget disables price-query retries and surfaces granular error messages. A patch changeset was added.

Changes

Cohort / File(s) Summary of Changes
Bridge: FundWallet token fetching & balance shape
packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
- Add isError to tokenQuery wrapper and to SelectedToken passed into TokenSection
- Treat unsupported_token and query errors as error states and render a global/inline error banner
- Change balance.data from `bigint
Bridge: Selected token button rendering
packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
- Add isError: boolean to selectedToken prop type
- Only render token visuals when selectedToken exists and isError is false; otherwise render fallback UI
Bridge: Swap UI — price query behavior & error propagation
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
- Disable automatic retries for token price queries (retry: false)
- Propagate buyTokenQuery.isError and sellTokenQuery.isError into selectedToken payloads
- Expand error condition to include buy/sell token fetch failures and provide specific error messages (quote vs buy vs sell token failures)
Release metadata
.changeset/rare-buckets-fly.md
- Add patch-level changeset noting UI error display when token detail fetching fails in BuyWidget and SwapWidget

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant UI as Bridge UI
  participant TF as Token Fetcher
  participant Q as Quote Preparer

  User->>UI: Open Swap/Fund flow
  UI->>TF: Fetch sell/buy token details & prices
  alt Token fetch succeeds
    TF-->>UI: Token data (with prices)
    UI->>Q: Prepare quote (if applicable)
    alt Quote succeeds
      Q-->>UI: Quote
      UI-->>User: Render token info and quote
    else Quote fails
      Q-->>UI: Error
      UI-->>User: Show "Failed to prepare quote" error
    end
  else Token fetch fails or unsupported
    TF-->>UI: Error (isError = true)
    UI-->>User: Show "Failed to fetch token details" error (skip token visuals)
  end
Loading
sequenceDiagram
  autonumber
  participant UI as SwapWidget
  participant ST as Sell Token Query
  participant BT as Buy Token Query

  UI->>ST: Query sell token (price query: retry=false)
  UI->>BT: Query buy token (price query: retry=false)
  par Collect states
    ST-->>UI: { data | isError }
    BT-->>UI: { data | isError }
  end
  alt ST.isError
    UI-->>User: Show "Failed to fetch sell token details"
  else BT.isError
    UI-->>User: Show "Failed to fetch buy token details"
  else No errors
    UI-->>User: Render token visuals and proceed
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The provided title concisely and accurately describes the main change, which is adding error handling in the BuyWidget and SwapWidget UIs when token detail fetching fails. It is specific and clear, allowing a teammate to understand the primary intent at a glance.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mny-241

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx (1)

395-412: Simplify the nested ternary for better readability.

While the error handling logic is correct and differentiates between quote preparation failure and token fetch failures, the deeply nested ternary reduces readability.

Apply this diff to simplify the error message logic:

-        >
-          {preparedResultQuery.error
-            ? "Failed to get a quote"
-            : buyTokenQuery.isError
-              ? "Failed to fetch buy token details"
-              : sellTokenQuery.isError
-                ? "Failed to fetch sell token details"
-                : "Failed to get a quote"}
-        </Text>
+        >
+          {(() => {
+            if (preparedResultQuery.error) return "Failed to get a quote";
+            if (buyTokenQuery.isError) return "Failed to fetch buy token details";
+            if (sellTokenQuery.isError) return "Failed to fetch sell token details";
+            return "Failed to get a quote";
+          })()}
+        </Text>

Alternatively, extract the error message to a helper function:

function getErrorMessage(
  preparedResultError: Error | null,
  buyTokenError: boolean,
  sellTokenError: boolean,
): string {
  if (preparedResultError) return "Failed to get a quote";
  if (buyTokenError) return "Failed to fetch buy token details";
  if (sellTokenError) return "Failed to fetch sell token details";
  return "Failed to get a quote";
}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 59bc1b6 and 9612ee8.

📒 Files selected for processing (4)
  • .changeset/rare-buckets-fly.md (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (5 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx (3 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
🧰 Additional context used
📓 Path-based instructions (4)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

.changeset/*.md: Each change in packages/* must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API

Files:

  • .changeset/rare-buckets-fly.md
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from @/types where applicable
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
packages/thirdweb/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling @example and a custom tag (@beta, @internal, @experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g., const { jsPDF } = await import("jspdf"))

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
🧠 Learnings (2)
📚 Learning: 2025-09-24T11:08:43.783Z
Learnt from: MananTank
PR: thirdweb-dev/js#8106
File: packages/thirdweb/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx:34-41
Timestamp: 2025-09-24T11:08:43.783Z
Learning: In BridgeWidgetProps for packages/thirdweb/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx, the Swap onError callback signature requires a non-undefined SwapPreparedQuote parameter (unlike Buy's onError which allows undefined quote). This is intentional - SwapWidget's onError is only called when a quote is available.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
📚 Learning: 2025-10-03T23:36:00.631Z
Learnt from: MananTank
PR: thirdweb-dev/js#8181
File: packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx:27-27
Timestamp: 2025-10-03T23:36:00.631Z
Learning: In packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx, the component intentionally uses a hardcoded English locale (connectLocaleEn) rather than reading from the provider, as BuyWidget is designed to be English-only and does not require internationalization support.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
🧬 Code graph analysis (1)
packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (5)
packages/thirdweb/src/react/core/design-system/index.ts (3)
  • radius (188-196)
  • spacing (174-186)
  • fontSize (164-172)
packages/thirdweb/src/react/web/ui/components/text.tsx (1)
  • Text (18-34)
packages/thirdweb/src/bridge/types/Token.ts (1)
  • TokenWithPrices (14-16)
packages/thirdweb/src/react/web/ui/components/Skeleton.tsx (1)
  • Skeleton (10-28)
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts (1)
  • formatTokenAmount (26-35)
⏰ 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)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (9)
.changeset/rare-buckets-fly.md (1)

1-5: LGTM!

The changeset correctly documents this as a patch-level change. The UI improvement for error handling in BuyWidget and SwapWidget does not modify the public API, making patch the appropriate version bump level.

packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx (3)

99-99: LGTM! Good UX decision.

Disabling automatic retries allows immediate error feedback to the user rather than waiting through multiple retry attempts. This aligns well with the PR objective of showing errors promptly.


319-327: LGTM! Consistent error state propagation.

The isError flag is correctly propagated from token queries to the selectedToken payloads for both sell and buy paths, enabling downstream components to render appropriate error states.

Also applies to: 372-380


628-653: LGTM! Type definition updated correctly.

The TokenSectionProps type now includes isError: boolean in the selectedToken union, which is consistent with the changes throughout the file and aligns with the error handling enhancements.

packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (5)

254-257: LGTM! Comprehensive error detection.

The isError flag correctly captures both token query failures and unsupported token scenarios, ensuring proper error state propagation to child components.


285-299: LGTM! Clear error feedback for users.

The global error banner provides consistent, visible feedback when token details fail to fetch. The styling with borders and spacing aligns with the design system, and the error message is clear and actionable.


404-411: LGTM! Type definition matches implementation.

The balance type definition has been updated to reflect the new object shape with value, decimals, symbol, and name properties, maintaining type safety throughout the component.


595-605: LGTM! Rendering logic updated correctly.

The balance rendering now correctly accesses the nested properties (balance.data.value, balance.data.decimals, balance.data.symbol) from the new object shape, and the usage in formatTokenAmount is consistent with the function signature.


260-263: Balance data shape is correct useTokenBalance (via useWalletBalance) returns a UseQueryResult<GetBalanceResult> where GetBalanceResult includes value, decimals, symbol, and name as expected.

Copy link
Contributor

github-actions bot commented Oct 7, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.6 KB (0%) 1.3 s (0%) 326 ms (+114.5% 🔺) 1.7 s
thirdweb (cjs) 365.75 KB (0%) 7.4 s (0%) 1.6 s (+3.94% 🔺) 8.9 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 115 ms (+1208.89% 🔺) 230 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 163 ms (+3383.27% 🔺) 173 ms
thirdweb/react (minimal + tree-shaking) 19.13 KB (0%) 383 ms (0%) 146 ms (+1757.55% 🔺) 528 ms

Copy link

codecov bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.02%. Comparing base (d7104f6) to head (62cfbb7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...es/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx 0.00% 20 Missing ⚠️
...act/web/ui/Bridge/common/selected-token-button.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8215      +/-   ##
==========================================
- Coverage   55.03%   55.02%   -0.02%     
==========================================
  Files         919      919              
  Lines       60569    60583      +14     
  Branches     4126     4126              
==========================================
  Hits        33333    33333              
- Misses      27132    27146      +14     
  Partials      104      104              
Flag Coverage Δ
packages 55.02% <0.00%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
...act/web/ui/Bridge/common/selected-token-button.tsx 8.00% <0.00%> (ø)
...es/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx 6.27% <0.00%> (-0.18%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

graphite-app bot commented Oct 7, 2025

Merge activity

…ils fails (#8215)

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces error handling in the `BuyWidget` and `SwapWidget` UIs, displaying appropriate error messages when fetching token details fails.

### Detailed summary
- Added `isError` state to handle errors in token fetching.
- Updated `SelectedTokenButton` to check for errors before rendering.
- Enhanced `SwapUI` to show error messages based on different query states.
- Implemented error display in `FundWallet` for unsupported tokens.
- Modified balance display logic to accommodate new error handling.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- New Features
  - Inline error banners in Buy and Swap widgets when token details fail to load.
  - Clear, specific messages for quote, buy-token, and sell-token fetch failures.
- Improvements
  - Selected token UI now falls back gracefully on errors instead of showing partial data.
  - Balance display uses richer token info (value, decimals, symbol, name) for accuracy.
  - More consistent handling of unsupported tokens across the flow.
- Bug Fixes
  - Prevents stale token icons/details from appearing during error states.
  - Disables auto-retry on token price fetches to reduce UI flicker.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (1)

285-299: Disable the CTA when token details errored

We now surface the “Failed to fetch token details” banner, but the main Continue button stays enabled because it only depends on receiver. In this error state the click path is a no-op (we immediately return when destinationToken is undefined), which is confusing. Please gate the button on the same error condition—e.g. include tokenQuery.isError || tokenQuery.data?.type === "unsupported_token" in the disabled prop—so the UI feedback and CTA state stay in sync.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9612ee8 and 62cfbb7.

📒 Files selected for processing (4)
  • .changeset/rare-buckets-fly.md (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (5 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx (3 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx (6 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

.changeset/*.md: Each change in packages/* must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API

Files:

  • .changeset/rare-buckets-fly.md
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from @/types where applicable
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
packages/thirdweb/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling @example and a custom tag (@beta, @internal, @experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g., const { jsPDF } = await import("jspdf"))

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
🧠 Learnings (2)
📚 Learning: 2025-09-24T11:08:43.783Z
Learnt from: MananTank
PR: thirdweb-dev/js#8106
File: packages/thirdweb/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx:34-41
Timestamp: 2025-09-24T11:08:43.783Z
Learning: In BridgeWidgetProps for packages/thirdweb/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx, the Swap onError callback signature requires a non-undefined SwapPreparedQuote parameter (unlike Buy's onError which allows undefined quote). This is intentional - SwapWidget's onError is only called when a quote is available.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
📚 Learning: 2025-10-03T23:36:00.631Z
Learnt from: MananTank
PR: thirdweb-dev/js#8181
File: packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx:27-27
Timestamp: 2025-10-03T23:36:00.631Z
Learning: In packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx, the component intentionally uses a hardcoded English locale (connectLocaleEn) rather than reading from the provider, as BuyWidget is designed to be English-only and does not require internationalization support.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx
⏰ 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). (4)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants