Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Oct 29, 2025


PR-Codex overview

This PR focuses on removing the Bridge.routes functionality and the useBridgeRoutes hook from the codebase, along with associated documentation and references.

Detailed summary

  • Deleted files: Routes.ts, Routes.test.ts, useBridgeRoutes.ts, useBridgeRoutes.test.ts, and related documentation.
  • Removed references to Get Routes in various *.md files.
  • Updated index.ts to stop exporting routes.
  • Adjusted useSendTransactionCore to use Bridge.tokens instead of Bridge.routes.
  • Eliminated the getAvailableRoutes method and related route comparison logic.

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

Summary by CodeRabbit

  • Breaking Changes

    • Removed the Bridge.routes API and the useBridgeRoutes React hook
    • Removed route-discovery and price-comparison surfaces (e.g., route listing and price comparator)
  • Documentation

    • Removed pages and guide links related to bridge route discovery, filtering, pagination, and price comparison
    • Updated sidebars/navigation to remove "Get Routes" links
  • Tests

    • Removed test suites covering the removed route APIs and hooks

@linear
Copy link

linear bot commented Oct 29, 2025

@vercel
Copy link

vercel bot commented Oct 29, 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 30, 2025 3:00pm
nebula Ready Ready Preview Comment Oct 30, 2025 3:00pm
thirdweb_playground Ready Ready Preview Comment Oct 30, 2025 3:00pm
thirdweb-www Ready Ready Preview Comment Oct 30, 2025 3:00pm
wallet-ui Ready Ready Preview Comment Oct 30, 2025 3:00pm

@github-actions github-actions bot added Portal Involves changes to the Portal (docs) codebase. packages SDK Involves changes to the thirdweb SDK labels Oct 29, 2025
@MananTank MananTank marked this pull request as ready for review October 29, 2025 20:57
@MananTank MananTank requested review from a team as code owners October 29, 2025 20:57
Copy link
Member Author

MananTank commented Oct 29, 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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Walkthrough

Removes the Bridge.routes API and the useBridgeRoutes React hook; updates useSendTransaction to query Bridge.tokens instead; deletes related tests, documentation pages and sidebar links; and removes re-exports and a changeset noting a minor release.

Changes

Cohort / File(s) Summary
Bridge API Removal
packages/thirdweb/src/bridge/Routes.ts, packages/thirdweb/src/bridge/Routes.test.ts
Deleted Bridge.routes function and its types (Options, Result) and removed the corresponding test suite covering fetching, filtering, pagination, and error handling.
React Hook Removal
packages/thirdweb/src/react/core/hooks/useBridgeRoutes.ts, packages/thirdweb/src/react/core/hooks/useBridgeRoutes.test.ts
Deleted the useBridgeRoutes hook and its UseBridgeRoutesParams type plus the hook's tests (React Query caching/retry logic removed).
Re-export Cleanup
packages/thirdweb/src/bridge/index.ts, packages/thirdweb/src/exports/react.ts
Removed re-exports of routes and of useBridgeRoutes / UseBridgeRoutesParams from the public barrels.
Hook Migration
packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts
Replaced Bridge.routes usage with Bridge.tokens; renamed parameters from destinationChainId/destinationTokenAddress to chainId/tokenAddress; adjusted logic to check tokens result and error handling.
Docs & Navigation
apps/portal/src/app/bridge/routes/page.mdx, apps/portal/src/app/bridge/swap/page.mdx, apps/portal/src/app/bridge/sell/page.mdx, apps/portal/src/app/bridge/tokens/page.mdx, apps/portal/src/app/bridge/sidebar.tsx, apps/portal/src/app/payments/sidebar.tsx, apps/portal/src/app/payments/send/page.mdx, apps/portal/src/app/payments/webhooks/page.mdx
Removed the Bridge "Find Routes"/"Get Routes" documentation page and all related "Get Routes"/"Find Routes" links and route-related sections from MDX content and sidebars; removed PriceComparator and route-discovery docs from swap page.
Release Metadata
.changeset/rotten-apes-sing.md
Added changeset marking a minor release for the thirdweb package documenting the API removals.

Sequence Diagram

sequenceDiagram
    participant Modal as Pay Modal
    participant Tx as useSendTransaction
    participant Bridge as Bridge API
    participant Tokens as Bridge.tokens

    rect rgb(220,240,200)
    Note over Modal,Tokens: New flow (post-change)
    Modal->>Tx: Funds insufficient
    Tx->>Bridge: Bridge.tokens(chainId, tokenAddress)
    Bridge-->>Tx: tokens[]
    alt tokens empty
        Tx-->>Modal: Show deposit mode
    else tokens available
        Tx-->>Modal: Show buy / funds-dynamic mode
    end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review attention suggestions:
    • packages/thirdweb/src/bridge/Routes.ts and its test removal — ensure no remaining internal callers.
    • packages/thirdweb/src/react/core/hooks/useBridgeRoutes.ts — confirm no consumers rely on the deleted hook or its caching/retry semantics.
    • packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts — verify parameter mapping and behavior equivalence when switching to Bridge.tokens.
    • Barrel files (exports/react.ts, bridge/index.ts) — check for orphaned or unresolved imports.
    • Documentation/sidebar deletions — confirm navigation consistency across portal pages.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description provided does not follow the required template structure. While it includes a PR-Codex overview with a detailed summary of changes, the required template sections are missing. Specifically, the "Notes for the reviewer" and "How to test" sections are not present or are incomplete. The description does include the issue tag (MNY-298) and content explaining what was changed, but the structured format specified in the template is not followed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "[MNY-298] SDK: Remove Bridge.routes, Update Docs" directly and clearly summarizes the main objective of the changeset. It includes the issue tag (MNY-298), specifies the primary action (removing Bridge.routes), and notes the secondary scope (updating docs). The title is concise, specific, and provides sufficient context for someone reviewing the commit history to understand the core change without additional details.
Linked Issues Check ✅ Passed The PR successfully meets the objectives from linked issue MNY-298. The changes include complete removal of the Bridge.routes function and associated types from packages/thirdweb/src/bridge/Routes.ts, removal of the useBridgeRoutes hook and its test file, elimination of all related exports from index.ts and react.ts barrel files, updates to dependent code (useSendTransaction) to use Bridge.tokens instead, and removal of all documentation and navigation references to the routes functionality across multiple .mdx and sidebar files.
Out of Scope Changes Check ✅ Passed All changes in the PR are directly related to the stated objective of removing Bridge.routes and its associated functionality. The modifications span removal of the core implementation files, deletion of test files, removal of export statements, updates to dependent code paths, and removal of documentation and navigation references. Each category of change logically supports the primary goal, and no unrelated changes to other features or systems are present.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ 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-298

📜 Recent 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 c45070d and c83f1c6.

📒 Files selected for processing (16)
  • .changeset/rotten-apes-sing.md (1 hunks)
  • apps/portal/src/app/bridge/routes/page.mdx (0 hunks)
  • apps/portal/src/app/bridge/sell/page.mdx (0 hunks)
  • apps/portal/src/app/bridge/sidebar.tsx (0 hunks)
  • apps/portal/src/app/bridge/swap/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/tokens/page.mdx (0 hunks)
  • apps/portal/src/app/payments/send/page.mdx (0 hunks)
  • apps/portal/src/app/payments/sidebar.tsx (0 hunks)
  • apps/portal/src/app/payments/webhooks/page.mdx (0 hunks)
  • packages/thirdweb/src/bridge/Routes.test.ts (0 hunks)
  • packages/thirdweb/src/bridge/Routes.ts (0 hunks)
  • packages/thirdweb/src/bridge/index.ts (0 hunks)
  • packages/thirdweb/src/exports/react.ts (0 hunks)
  • packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts (2 hunks)
  • packages/thirdweb/src/react/core/hooks/useBridgeRoutes.test.ts (0 hunks)
  • packages/thirdweb/src/react/core/hooks/useBridgeRoutes.ts (0 hunks)
💤 Files with no reviewable changes (13)
  • apps/portal/src/app/payments/sidebar.tsx
  • apps/portal/src/app/payments/webhooks/page.mdx
  • packages/thirdweb/src/exports/react.ts
  • packages/thirdweb/src/bridge/index.ts
  • packages/thirdweb/src/bridge/Routes.ts
  • packages/thirdweb/src/react/core/hooks/useBridgeRoutes.test.ts
  • apps/portal/src/app/payments/send/page.mdx
  • apps/portal/src/app/bridge/sidebar.tsx
  • apps/portal/src/app/bridge/sell/page.mdx
  • apps/portal/src/app/bridge/tokens/page.mdx
  • packages/thirdweb/src/bridge/Routes.test.ts
  • apps/portal/src/app/bridge/routes/page.mdx
  • packages/thirdweb/src/react/core/hooks/useBridgeRoutes.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts
  • apps/portal/src/app/bridge/swap/page.mdx
🧰 Additional context used
📓 Path-based instructions (1)
.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/rotten-apes-sing.md
🧠 Learnings (3)
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to .changeset/*.md : Version bump rules: patch for non‑API changes; minor for new/modified public API

Applied to files:

  • .changeset/rotten-apes-sing.md
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions

Applied to files:

  • .changeset/rotten-apes-sing.md
📚 Learning: 2025-09-24T11:09:45.142Z
Learnt from: MananTank
PR: thirdweb-dev/js#8106
File: packages/thirdweb/src/script-exports/readme.md:6-7
Timestamp: 2025-09-24T11:09:45.142Z
Learning: For thirdweb Bridge Widget script exports, the module is exported with globalName: "BridgeWidget" in tsup config, making the global API `BridgeWidget.render()` rather than `window.thirdweb.BridgeWidget.render()`.

Applied to files:

  • .changeset/rotten-apes-sing.md
⏰ 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: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: Size
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)

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.

@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

🦋 Changeset detected

Latest commit: c83f1c6

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

This PR includes changesets to release 4 packages
Name Type
thirdweb Minor
@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
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: 1

📜 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 f790c9f and c45070d.

📒 Files selected for processing (16)
  • .changeset/rotten-apes-sing.md (1 hunks)
  • apps/portal/src/app/bridge/routes/page.mdx (0 hunks)
  • apps/portal/src/app/bridge/sell/page.mdx (0 hunks)
  • apps/portal/src/app/bridge/sidebar.tsx (0 hunks)
  • apps/portal/src/app/bridge/swap/page.mdx (1 hunks)
  • apps/portal/src/app/bridge/tokens/page.mdx (0 hunks)
  • apps/portal/src/app/payments/send/page.mdx (0 hunks)
  • apps/portal/src/app/payments/sidebar.tsx (0 hunks)
  • apps/portal/src/app/payments/webhooks/page.mdx (0 hunks)
  • packages/thirdweb/src/bridge/Routes.test.ts (0 hunks)
  • packages/thirdweb/src/bridge/Routes.ts (0 hunks)
  • packages/thirdweb/src/bridge/index.ts (0 hunks)
  • packages/thirdweb/src/exports/react.ts (0 hunks)
  • packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts (2 hunks)
  • packages/thirdweb/src/react/core/hooks/useBridgeRoutes.test.ts (0 hunks)
  • packages/thirdweb/src/react/core/hooks/useBridgeRoutes.ts (0 hunks)
💤 Files with no reviewable changes (13)
  • apps/portal/src/app/payments/send/page.mdx
  • packages/thirdweb/src/bridge/index.ts
  • apps/portal/src/app/bridge/tokens/page.mdx
  • apps/portal/src/app/bridge/sidebar.tsx
  • packages/thirdweb/src/exports/react.ts
  • apps/portal/src/app/payments/sidebar.tsx
  • apps/portal/src/app/payments/webhooks/page.mdx
  • apps/portal/src/app/bridge/routes/page.mdx
  • packages/thirdweb/src/bridge/Routes.test.ts
  • packages/thirdweb/src/bridge/Routes.ts
  • packages/thirdweb/src/react/core/hooks/useBridgeRoutes.test.ts
  • packages/thirdweb/src/react/core/hooks/useBridgeRoutes.ts
  • apps/portal/src/app/bridge/sell/page.mdx
🧰 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/rotten-apes-sing.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/core/hooks/transaction/useSendTransaction.ts
**/*.{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/core/hooks/transaction/useSendTransaction.ts
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/core/hooks/transaction/useSendTransaction.ts
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Prefer API routes or server actions to keep tokens secret; the browser only sees relative paths.
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to .changeset/*.md : Version bump rules: patch for non‑API changes; minor for new/modified public API

Applied to files:

  • .changeset/rotten-apes-sing.md
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions

Applied to files:

  • .changeset/rotten-apes-sing.md
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to packages/thirdweb/exports/** : Export all public API via `packages/thirdweb/exports/`, grouped by feature

Applied to files:

  • .changeset/rotten-apes-sing.md
📚 Learning: 2025-09-24T11:09:45.142Z
Learnt from: MananTank
PR: thirdweb-dev/js#8106
File: packages/thirdweb/src/script-exports/readme.md:6-7
Timestamp: 2025-09-24T11:09:45.142Z
Learning: For thirdweb Bridge Widget script exports, the module is exported with globalName: "BridgeWidget" in tsup config, making the global API `BridgeWidget.render()` rather than `window.thirdweb.BridgeWidget.render()`.

Applied to files:

  • .changeset/rotten-apes-sing.md
📚 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/core/hooks/transaction/useSendTransaction.ts
📚 Learning: 2025-08-28T20:50:33.170Z
Learnt from: joaquim-verges
PR: thirdweb-dev/js#7922
File: apps/playground-web/src/app/ai/ai-sdk/components/chat-container.tsx:167-181
Timestamp: 2025-08-28T20:50:33.170Z
Learning: The SignTransactionInput schema in thirdweb-dev/ai-sdk-provider uses snake_case field names (chain_id) rather than camelCase (chainId).

Applied to files:

  • packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).

Applied to files:

  • packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts
📚 Learning: 2025-05-27T19:55:25.056Z
Learnt from: MananTank
PR: thirdweb-dev/js#7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts:49-49
Timestamp: 2025-05-27T19:55:25.056Z
Learning: In the ERC20 public pages token price data hook (`useTokenPriceData.ts`), direct array access on `json.data[0]` without optional chaining is intentionally correct and should not be changed to use safety checks.

Applied to files:

  • packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts
📚 Learning: 2025-08-27T22:11:41.748Z
Learnt from: MananTank
PR: thirdweb-dev/js#7933
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page-impl.tsx:465-473
Timestamp: 2025-08-27T22:11:41.748Z
Learning: In the token creation flow (create-token-page-impl.tsx), the createTokenOnUniversalBridge() call is intentionally not awaited (fire-and-forget pattern) to allow the token creation process to complete immediately without waiting for the bridge operation. This is a deliberate design choice to prioritize user experience by not blocking the main flow with supplementary bridge operations.

Applied to files:

  • packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts
📚 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:

  • apps/portal/src/app/bridge/swap/page.mdx
🧬 Code graph analysis (1)
packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts (1)
packages/thirdweb/src/bridge/Token.ts (1)
  • tokens (131-193)
⏰ 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: E2E Tests (pnpm, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
apps/portal/src/app/bridge/swap/page.mdx (2)

168-197: Code example uses correct APIs post-Bridge.routes removal.

The SwapManager example uses Bridge.Buy.prepare() and Bridge.status() to fetch quotes and track transaction status. These APIs remain available and the example correctly avoids references to the removed Bridge.routes API. The code is accurate for the updated SDK surface.


321-321: Line 321 link destination is valid and properly updated.

The updated "Going Further" section correctly references [Token Prices](/bridge/tokens), which points to a valid documentation page. The change appropriately replaces the removed Bridge.routes reference with a suitable alternative. No dangling references to removed APIs (Bridge.routes, getAvailableRoutes, PriceComparator) were found in the file.

packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts (2)

256-270: LGTM - Clean migration to Bridge.tokens with robust error handling.

The replacement of Bridge.routes with Bridge.tokens is implemented correctly:

  • Parameters match the API signature (chainId, tokenAddress optional)
  • Error handling tracks API failures and gracefully degrades by returning null
  • The catch ensures users aren't blocked if the API is unavailable

272-296: LGTM - Correctly handles both API failures and unsupported tokens.

The conditional logic appropriately checks for both null (API error) and empty array (unsupported chain/token), showing the deposit screen in either case. The tracking event provides detailed context including chain ID and token address, which will help diagnose issues.

Comment on lines +2 to +5
"thirdweb": minor
---

Remove `Bridge.routes` and `useBridgeRoutes`
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Use "major" version bump for breaking API removals.

Removing public APIs (Bridge.routes and useBridgeRoutes) is a breaking change and requires a major version bump, not minor. Additionally, the changeset description should clearly surface the breaking nature of this change.

Apply this diff to correct the version bump and improve the changeset description:

---
-"thirdweb": minor
+"thirdweb": major
---

-Remove `Bridge.routes` and `useBridgeRoutes`
+BREAKING: Remove `Bridge.routes` and `useBridgeRoutes` public APIs

Per coding guidelines and learnings: patch for non‑API changes; major for breaking API removals. Breaking changes should be surfaced prominently in PR descriptions.

🤖 Prompt for AI Agents
In .changeset/rotten-apes-sing.md around lines 2 to 5, the changeset incorrectly
uses a "minor" bump while removing public APIs (Bridge.routes and
useBridgeRoutes); change the version bump from "minor" to "major" and update the
changeset body to explicitly state this is a breaking change that removes those
public APIs and list migration guidance (e.g., alternative APIs or removal
notice) so the breaking nature is clearly surfaced in the description.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

size-limit report 📦

Path Size
@thirdweb-dev/nexus (esm) 104.88 KB (0%)
@thirdweb-dev/nexus (cjs) 316.6 KB (0%)

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.87%. Comparing base (bc02954) to head (c83f1c6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...react/core/hooks/transaction/useSendTransaction.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8335      +/-   ##
==========================================
- Coverage   54.89%   54.87%   -0.03%     
==========================================
  Files         920      919       -1     
  Lines       60715    60653      -62     
  Branches     4129     4117      -12     
==========================================
- Hits        33331    33283      -48     
+ Misses      27282    27268      -14     
  Partials      102      102              
Flag Coverage Δ
packages 54.87% <0.00%> (-0.03%) ⬇️
Files with missing lines Coverage Δ
packages/thirdweb/src/bridge/index.ts 100.00% <ø> (ø)
...react/core/hooks/transaction/useSendTransaction.ts 11.04% <0.00%> (+0.19%) ⬆️
🚀 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.

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 30, 2025

Merge activity

<!--

## 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 focuses on removing the `Bridge.routes` functionality and the `useBridgeRoutes` hook from the codebase, along with related references and documentation updates in various files.

### Detailed summary

- Deleted `Routes.ts`, `Routes.test.ts`, and `useBridgeRoutes.ts` files.
- Removed references to `Bridge.routes` in multiple `.mdx` files and sidebar components.
- Updated `index.ts` to stop exporting `routes`.
- Adjusted `useSendTransactionCore` to use `Bridge.tokens` instead of `Bridge.routes`.
- Removed the `PriceComparator` class and associated methods for route comparison.

> ✨ 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

* **Breaking Changes**
  * Removed the Bridge.routes API, which previously supported route discovery with filtering by chains and tokens, pagination, and sorting
  * Removed the useBridgeRoutes React hook

* **Documentation**
  * Removed documentation pages covering bridge route discovery and filtering functionality
  * Removed related sidebar and guide navigation links

* **Tests**
  * Removed test suites for removed APIs

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages Portal Involves changes to the Portal (docs) codebase. SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants