Skip to content

Feature: Update UB Docs for latest SDK and Guides #7265

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

Merged
merged 7 commits into from
Jun 3, 2025

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Jun 3, 2025


PR-Codex overview

This PR focuses on updating the Universal Bridge documentation and related components to enhance the user experience for cross-chain payments, onramps, and NFT checkouts. It includes the removal of outdated guides, the addition of new features, and improvements to existing functionalities.

Detailed summary

  • Deleted outdated guides: testing-pay, accept-direct-payments, build-a-custom-experience.
  • Updated links in layout.tsx and sidebar.tsx to reflect new paths.
  • Modified sidebar links for better navigation and updated names.
  • Added new guides for onramp-integration, smart-accounts, and cross-chain-swapping.
  • Enhanced page.mdx with new features and clearer instructions for users.
  • Improved examples in the get-started guide, including new steps for initializing clients and preparing swaps.
  • Streamlined NFT checkout process documentation with detailed flow and error handling.

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

Summary by CodeRabbit

  • New Features

    • Added detailed guides for NFT checkout, fiat onramp integration, and using smart accounts with Universal Bridge, including comprehensive tutorials, code examples, and step-by-step instructions.
  • Documentation

    • Major updates to Universal Bridge documentation, shifting from UI component-based examples to modular SDK usage with explicit TypeScript code samples.
    • Expanded feature lists, SDK module overviews, quick start examples, and implementation approach comparisons.
    • Updated sidebar navigation to reflect new and reorganized guides.
    • Removed outdated guides and test mode documentation to streamline and modernize developer resources.

…es section

- Replaced existing feature cards with new titles and descriptions, including "Cross-Chain Asset Routing" and "Fiat-to-Crypto Onramps."
- Introduced new features such as "Webhook Integration" and "Real-time Status Tracking."
- Added a detailed SDK modules section outlining key functionalities for developers.
- Improved overall clarity and organization of the payment documentation.
…lation guide

- Replaced outdated links in the sidebar with new entries for "Installation" and "Recipes."
- Updated the installation guide to provide clearer instructions for integrating the Universal Bridge SDK, including detailed steps for setting up the client and preparing transactions.
- Added new sections for transaction status tracking and error handling to improve user guidance.
…ted guides

- Removed the "Accept Direct Payments" and "Build a Custom Onramp Experience" guides from the sidebar.
- Added a new link for "Smart Accounts" to enhance user navigation.
- Updated the cross-chain swapping guide to improve clarity and consistency in transaction parameters.
…on guide

- Removed the "Developer Mode" section from the sidebar for clarity.
- Renamed "Smart Accounts" to "Swap Smart Accounts" for better specificity.
- Added a new guide for "Fiat Onramp Integration," detailing how to integrate fiat-to-crypto onramps using Stripe, Coinbase, and Transak.
- Improved organization and navigation within the payment documentation.
…ounts" to "Swap with Smart Accounts" and add new "NFT Checkout" guide for improved user navigation.
@gregfromstl gregfromstl requested review from a team as code owners June 3, 2025 20:11
Copy link

changeset-bot bot commented Jun 3, 2025

⚠️ No Changeset found

Latest commit: 10315f5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jun 3, 2025

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2025 8:36pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2025 8:36pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
login ⬜️ Skipped (Inspect) Jun 3, 2025 8:36pm
thirdweb_playground ⬜️ Skipped (Inspect) Jun 3, 2025 8:36pm
wallet-ui ⬜️ Skipped (Inspect) Jun 3, 2025 8:36pm

Copy link
Contributor

graphite-app bot commented Jun 3, 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.

Copy link
Contributor

coderabbitai bot commented Jun 3, 2025

Walkthrough

The documentation for the Universal Bridge SDK and related payment flows was extensively restructured. Several guides were removed and replaced with new, modular tutorials focused on SDK-based integration, updated code examples, and new features like smart accounts and NFT checkout. Sidebar navigation and feature descriptions were revised to reflect these changes.

Changes

File(s) Change Summary
apps/portal/src/app/pay/get-started/page.mdx Overhauled to replace UI component integration examples with modular, code-centric SDK usage, new tabbed "Recipes" section, explicit client initialization, transaction status tracking, and error handling examples.
apps/portal/src/app/pay/page.mdx Expanded and updated feature list, added SDK modules section, reorganized integration options, included new quick start code examples, and improved technical guidance.
apps/portal/src/app/pay/sidebar.tsx Updated sidebar links and section structure to match new and removed guides; removed unused icon import and "Developer Mode" entry.
apps/portal/src/app/pay/guides/accept-direct-payments/page.mdx
apps/portal/src/app/pay/guides/build-a-custom-experience/page.mdx
apps/portal/src/app/pay/testing-pay/page.mdx
Deleted detailed guides for direct payments, custom onramp experience, and testing mode.
apps/portal/src/app/pay/guides/cross-chain-swapping/page.mdx Revised to reflect new Bridge SDK usage, parameter renaming, new transaction structure (steps array), automatic approval handling, and updated status polling logic.
apps/portal/src/app/pay/guides/nft-checkout/page.mdx Added comprehensive tutorial for building an NFT checkout flow with Universal Bridge, including wallet auth, provider selection, onramp sessions, payment monitoring, NFT minting, and error handling.
apps/portal/src/app/pay/guides/onramp-integration/page.mdx Added new guide for fiat-to-crypto onramp integration, provider setup, session preparation, status monitoring, and related documentation links.
apps/portal/src/app/pay/guides/smart-accounts/page.mdx Added new guide for using EIP7702 smart accounts with Universal Bridge, covering setup, batched transactions, gas sponsorship, and status polling.
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/layout.tsx Updated "Learn more" link URL in Universal Bridge layout component from old to new portal pay page URL.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant BridgeSDK
    participant OnrampProvider
    participant Blockchain

    User->>App: Initiate payment or swap
    App->>BridgeSDK: Prepare quote/session (e.g., buy, transfer, onramp)
    BridgeSDK-->>App: Return prepared steps/transactions
    loop For each step in steps
        App->>BridgeSDK: Send and confirm transaction(s)
        BridgeSDK->>Blockchain: Submit transaction
        Blockchain-->>BridgeSDK: Transaction receipt
        BridgeSDK-->>App: Transaction status
    end
    App->>BridgeSDK: Poll for transaction status
    BridgeSDK-->>App: Status (COMPLETED/FAILED/etc.)
    App-->>User: Update UI (success, error, etc.)
Loading

Possibly related PRs

  • thirdweb-dev/js#7185: Adds explicit country parameter to onramp API and prepare calls, directly related to updated onramp integration examples in this PR.

  • thirdweb-dev/js#7119: Introduces the ApiError class and refactors Bridge SDK modules to throw ApiError exceptions, which directly relates to the new error handling documentation and examples.

Suggested reviewers

  • joaquim-verges

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.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9985ed3 and 10315f5.

📒 Files selected for processing (1)
  • apps/portal/src/app/pay/guides/nft-checkout/page.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/portal/src/app/pay/guides/nft-checkout/page.mdx
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Build Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Portal Involves changes to the Portal (docs) codebase. label Jun 3, 2025
Copy link

linear bot commented Jun 3, 2025

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: 3

🔭 Outside diff range comments (1)
apps/portal/src/app/pay/guides/cross-chain-swapping/page.mdx (1)

29-37: 🛠️ Refactor suggestion

Fix nested <Step> tags

The <Step> for installing the SDK opens and immediately nests the next <Step>. You should close the first step before opening the second:

 <Steps>
-<Step title='Install the Connect SDK'>
+<Step title='Install the Connect SDK'>
   <InstallTabs ... />
-<Step title='Get Your Client ID'>
+  </Step>
+  <Step title='Get Your Client ID'>
🧹 Nitpick comments (6)
apps/portal/src/app/pay/guides/smart-accounts/page.mdx (2)

1-8: Remove unused import: DocImage

The DocImage component is imported but not used anywhere in this guide. Consider removing it to clean up imports.

Apply:

import {
  createMetadata,
  Callout,
- DocImage,
  InstallTabs,
  Steps,
  Step,
} from "@doc";

68-86: Consolidate imports for clarity

You can combine sendBatchTransaction into the main thirdweb import to reduce line count and improve readability.

-import { Bridge, NATIVE_TOKEN_ADDRESS, toWei } from "thirdweb";
-import { sendBatchTransaction } from "thirdweb";
+import {
+  Bridge,
+  NATIVE_TOKEN_ADDRESS,
+  toWei,
+  sendBatchTransaction,
+} from "thirdweb";
apps/portal/src/app/pay/guides/cross-chain-swapping/page.mdx (2)

1-8: Remove unused import: DocImage

The DocImage component is not used in this file. Consider removing it to tidy imports.

-import {
-  createMetadata,
-  Callout,
-  DocImage,
-  InstallTabs,
-  Steps,
-  Step,
-} from "@doc";
+import {
+  createMetadata,
+  Callout,
+  InstallTabs,
+  Steps,
+  Step,
+} from "@doc";

9-10: Remove unused asset import

OnrampStepOne is imported but never used. You may remove this import or add the intended image to the guide.

apps/portal/src/app/pay/guides/nft-checkout/page.mdx (2)

1-12: Remove unused imports: DocImage and Tabs components

DocImage, Tabs, TabsList, TabsTrigger, and TabsContent are imported but never used. Consider removing them to declutter the import.

-import {
-  createMetadata,
-  Callout,
-  DocImage,
-  InstallTabs,
-  Steps,
-  Step,
-  Tabs,
-  TabsList,
-  TabsTrigger,
-  TabsContent,
-} from "@doc";
+import {
+  createMetadata,
+  Callout,
+  InstallTabs,
+  Steps,
+  Step,
+} from "@doc";

78-115: WalletAuth callback may cause double renders

Calling onConnect directly inside the render when account is truthy can trigger repeated renders. Consider moving onConnect into a useEffect to avoid side effects during render.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ebb754 and 6366174.

📒 Files selected for processing (10)
  • apps/portal/src/app/pay/get-started/page.mdx (2 hunks)
  • apps/portal/src/app/pay/guides/accept-direct-payments/page.mdx (0 hunks)
  • apps/portal/src/app/pay/guides/build-a-custom-experience/page.mdx (0 hunks)
  • apps/portal/src/app/pay/guides/cross-chain-swapping/page.mdx (2 hunks)
  • apps/portal/src/app/pay/guides/nft-checkout/page.mdx (1 hunks)
  • apps/portal/src/app/pay/guides/onramp-integration/page.mdx (1 hunks)
  • apps/portal/src/app/pay/guides/smart-accounts/page.mdx (1 hunks)
  • apps/portal/src/app/pay/page.mdx (4 hunks)
  • apps/portal/src/app/pay/sidebar.tsx (2 hunks)
  • apps/portal/src/app/pay/testing-pay/page.mdx (0 hunks)
💤 Files with no reviewable changes (3)
  • apps/portal/src/app/pay/guides/accept-direct-payments/page.mdx
  • apps/portal/src/app/pay/testing-pay/page.mdx
  • apps/portal/src/app/pay/guides/build-a-custom-experience/page.mdx
🧰 Additional context used
🪛 LanguageTool
apps/portal/src/app/pay/guides/onramp-integration/page.mdx

[uncategorized] ~141-~141: Loose punctuation mark.
Context: ...link); return onrampSession; } catch (error) { console.error("Fail...

(UNLIKELY_OPENING_PUNCTUATION)

apps/portal/src/app/pay/guides/nft-checkout/page.mdx

[uncategorized] ~719-~719: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...tically after successful payment ### Production Ready - Multiple Providers: Stripe, Coi...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[uncategorized] ~735-~735: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...es**: Digital art and collectibles with zero friction - Event Ticketing: NFT-based ticket...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (38)
apps/portal/src/app/pay/sidebar.tsx (2)

47-53: LGTM! Navigation structure aligns with new SDK-focused approach.

The updated "Get Started" section links properly reflect the shift from UI component examples to modular SDK installation and recipes, which is consistent with the overall documentation restructuring.


62-77: Well-organized tutorial structure with comprehensive coverage.

The updated tutorials section provides good coverage of core Universal Bridge functionality including cross-chain swapping, smart accounts, fiat onramp, and NFT checkout. The organization is logical and user-friendly.

apps/portal/src/app/pay/guides/onramp-integration/page.mdx (4)

1-23: Excellent metadata and documentation structure.

The metadata is properly configured with appropriate title, description, and social sharing information. The import statements include all necessary components for a comprehensive guide.


65-83: Comprehensive Stripe onramp example with good practices.

The Stripe integration example is well-structured and includes all necessary parameters. The code demonstrates proper error handling and user experience considerations.


91-116: Robust Coinbase onramp implementation with proper error handling.

The Coinbase example includes excellent error handling, logging, and user feedback. The try-catch structure and detailed console logging make debugging easier for developers.


154-191: Comprehensive status monitoring with clear state handling.

The status monitoring section provides excellent coverage of all possible transaction states with appropriate actions for each. The polling mechanism and error handling are well-implemented.

apps/portal/src/app/pay/page.mdx (3)

28-62: Excellent feature descriptions with clear value propositions.

The updated feature cards provide comprehensive coverage of Universal Bridge capabilities with clear, benefit-focused descriptions. The icons appropriately represent each feature area.


65-77: Well-structured SDK modules overview.

The new SDK modules table provides excellent clarity on the different modules and their purposes. This helps developers understand the modular architecture and choose the right functions for their use case.


104-159: Practical quick start examples demonstrate real-world usage.

The code examples are comprehensive and show realistic usage patterns. They include proper imports, error handling considerations, and demonstrate the SDK's key functionality effectively.

apps/portal/src/app/pay/get-started/page.mdx (5)

33-76: Excellent installation flow with practical initial setup.

The installation steps are well-structured and include all necessary components: SDK installation, client ID setup, client initialization, and a practical first example. The progression is logical and developer-friendly.


82-135: Comprehensive Buy module recipe with clear progression.

The Buy/Bridge & Swap recipe provides excellent coverage from quote to execution. The step-by-step approach with clear comments makes it easy for developers to understand the complete flow.


169-195: Practical onramp integration with provider flexibility.

The onramp recipe demonstrates multi-provider support effectively and includes practical cost display and redirect handling. The example is realistic and production-ready.


232-261: Robust status tracking with comprehensive state handling.

The status tracking section covers all possible transaction states with appropriate handling for each. The switch statement approach is clean and extensible.


265-288: Excellent error handling with detailed debugging information.

The error handling section demonstrates proper ApiError handling with useful debugging information including correlation IDs. This will significantly help developers troubleshoot issues.

apps/portal/src/app/pay/guides/smart-accounts/page.mdx (9)

10-18: Metadata configuration looks good

The SEO metadata values are well-defined, concise, and descriptive.


20-28: Guide title and intro verified

The heading and introductory description clearly explain the purpose and benefits of using smart accounts.


28-35: Install step is correct

The InstallTabs component usage and step structure are correctly implemented.


36-61: Verify example setup code completeness

The snippet correctly shows how to configure and connect an EIP7702 in-app wallet. Ensure surrounding context indicates this code should be inside an async function or React effect to use await.


63-65: Callout usage is appropriate

The informational callout correctly highlights key EIP7702 benefits.


88-90: Batching rule callout is clear

The important callout correctly emphasizes chain-based batching constraints.


93-140: Confirm parameter names for waitForReceipt

The code uses chain: step.transactions[0].chain, but later chainId when polling status. Verify that waitForReceipt accepts a chain object (not just chainId) and that the transaction object's chain property exists. Otherwise, this may cause runtime errors.


142-144: Smart account atomic callout is accurate

This callout succinctly explains the atomic execution and sponsorship model.


149-155: Next Steps links are correct

The related documentation links appear valid and are consistent with repository structure.

apps/portal/src/app/pay/guides/cross-chain-swapping/page.mdx (9)

11-19: Metadata configuration is valid

The page metadata (title, description, image) accurately reflects the cross-chain swapping guide.


21-25: Heading and intro content approved

The heading and introductory paragraphs are clear and informative.


47-69: Get available routes example is correct

The snippet correctly demonstrates filtering and paginating routes.


73-83: Callout clarifies Buy vs Sell usage

The informational callout effectively distinguishes Buy and Sell namespaces.


88-96: Quote snippet updated properly

The transition from buyAmountWei to amount with a bigint literal is correctly illustrated.


105-117: Prepare snippet is consistent

The change from flat transactions to steps is correctly reflected in the example.


187-188: Final callout is helpful

The info callout highlights transaction configuration details appropriately.


195-203: Status retrieval example approved

This code correctly shows how to fetch the status of a bridge transaction.


207-221: Expanded status handling is accurate

Including NOT_FOUND and explicit logs enhances clarity for readers.

apps/portal/src/app/pay/guides/nft-checkout/page.mdx (6)

14-22: Metadata section is correct

The title, icon, and description are well-crafted for the NFT Checkout guide.


24-30: Header and intro are clear

The heading and introductory text succinctly explain the flow and use cases.


32-39: Install step is implemented correctly

InstallTabs usage follows the established pattern.


40-71: Project setup snippet is complete

The snippet shows client creation and contract instantiation correctly.


73-75: Info callout is appropriate

This note effectively guides readers on deploying to mainnet for production.


704-707: Final callout helps summarize features

The closing info callout effectively reinforces the end-to-end experience.

Copy link
Contributor

github-actions bot commented Jun 3, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 62.57 KB (0%) 1.3 s (0%) 250 ms (+194.65% 🔺) 1.6 s
thirdweb (cjs) 345.38 KB (0%) 7 s (0%) 678 ms (+13.7% 🔺) 7.6 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 99 ms (+1350.1% 🔺) 213 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 13 ms (+467.97% 🔺) 24 ms
thirdweb/react (minimal + tree-shaking) 19.56 KB (0%) 392 ms (0%) 95 ms (+696.91% 🔺) 486 ms

Copy link

codecov bot commented Jun 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.57%. Comparing base (dfe4cf0) to head (10315f5).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7265   +/-   ##
=======================================
  Coverage   55.57%   55.57%           
=======================================
  Files         909      909           
  Lines       58680    58681    +1     
  Branches     4157     4167   +10     
=======================================
+ Hits        32610    32612    +2     
+ Misses      25963    25961    -2     
- Partials      107      108    +1     
Flag Coverage Δ
packages 55.57% <ø> (+<0.01%) ⬆️

see 3 files with indirect coverage changes

🚀 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.

…e and enhance NFT checkout guide with new imports for improved functionality.
@vercel vercel bot temporarily deployed to Preview – login June 3, 2025 20:22 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 3, 2025 20:22 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 3, 2025 20:22 Inactive
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Jun 3, 2025
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: 4

🔭 Outside diff range comments (2)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/layout.tsx (2)

88-88: ⚠️ Potential issue

Update footer link for consistency.

The footer still references the old URL structure (https://portal.thirdweb.com/connect/pay/overview) while the main "Learn more" link has been updated to the new structure. This inconsistency could confuse users.

Apply this diff to maintain consistency:

-            href: "https://portal.thirdweb.com/connect/pay/overview",
+            href: "https://portal.thirdweb.com/pay",

Or verify if the footer should point to a different specific page within the new documentation structure.


88-103: 💡 Verification agent

🧩 Analysis chain

Verify all documentation links in the footer.

Since the documentation has been restructured, please verify that all the footer links are still valid and point to the correct updated documentation pages.


🏁 Script executed:

#!/bin/bash
# Description: Verify all documentation URLs in the footer are accessible
# Expected result: All URLs should return HTTP 200 status codes

urls=(
  "https://portal.thirdweb.com/connect/pay/overview"
  "https://portal.thirdweb.com/typescript/v5/convertCryptoToFiat"
  "https://portal.thirdweb.com/react/v5/pay/fund-wallets"
  "https://portal.thirdweb.com/dotnet/universal-bridge/quickstart"
)

for url in "${urls[@]}"; do
  echo "Checking: $url"
  status=$(curl -o /dev/null -s -w "%{http_code}" "$url")
  echo "Status: $status"
  echo "---"
done

Length of output: 1560


🏁 Script executed:

#!/bin/bash
# Description: Determine the final URL targets for routes returning 308
urls=(
  "https://portal.thirdweb.com/connect/pay/overview"
  "https://portal.thirdweb.com/typescript/v5/convertCryptoToFiat"
)

for url in "${urls[@]}"; do
  echo "Original: $url"
  # Follow redirects and output the final effective URL and status
  curl -s -o /dev/null -w "HTTP %{http_code} -> final URL: %{url_effective}\n" -L "$url"
done

Length of output: 870


Update the Pay Overview documentation link

The “Overview” URL currently returns a 308 and redirects to the new /pay page. Please update it to avoid the redirect. The other links are returning 200 and can remain unchanged.

• File:
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/layout.tsx (lines 88–103)

 {
-    href: "https://portal.thirdweb.com/connect/pay/overview",
+    href: "https://portal.thirdweb.com/pay",
   label: "Overview",
 },
🧹 Nitpick comments (2)
apps/portal/src/app/pay/guides/nft-checkout/page.mdx (2)

1-12: Cleanup unused MDX imports
The top import block brings in DocImage, Tabs, TabsList, TabsTrigger, and TabsContent, which aren’t used in this page. Removing these will reduce noise and maintenance overhead.


83-150: Clarify client context in wallet auth snippet
This snippet references the client instance without showing its import or initialization. Consider adding a comment like:

// Assume `client` is initialized as shown in the previous step

or include an explicit import to avoid confusion when copying this code.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6366174 and 9985ed3.

📒 Files selected for processing (2)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/layout.tsx (1 hunks)
  • apps/portal/src/app/pay/guides/nft-checkout/page.mdx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Build Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
apps/portal/src/app/pay/guides/nft-checkout/page.mdx (3)

44-71: Setup snippet looks correct
The project and contract setup example properly imports and configures the thirdweb client and NFT contract, and defines pricing and metadata. Good to go.


369-452: PaymentOptions component is well-defined
The PaymentOptions snippet correctly lists providers and handles selection. JSX and styling are clear.


454-557: ProcessingStep snippet is functional
Auto-progress timers and step visuals are implemented correctly. No issues found.

@@ -33,7 +33,7 @@ export default async function Layout(props: {
tokens via cross-chain routing.{" "}
<UnderlineLink
target="_blank"
href="https://portal.thirdweb.com/connect/pay/overview"
href="https://portal.thirdweb.com/pay"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify the new documentation URL and ensure consistency.

The URL has been simplified from the previous structure, which aligns with the documentation restructuring. However, there's an inconsistency within this same file.

Please verify that the new URL is accessible and contains the expected content:


🏁 Script executed:

#!/bin/bash
# Description: Verify the new documentation URL is accessible
# Expected result: Should return HTTP 200 status code

curl -I "https://portal.thirdweb.com/pay"

Length of output: 1692


🏁 Script executed:

#!/bin/bash
# Search for any remaining references to the old documentation URL structure
rg -n "portal\.thirdweb\.com/connect/pay" .

Length of output: 2509


Ensure consistent documentation URLs across the codebase

Verified that https://portal.thirdweb.com/pay returns HTTP 200. However, there are still multiple links pointing to the old portal.thirdweb.com/connect/pay/... structure. To avoid confusion and maintain consistency, please update the following references (or confirm if any should remain on a specific sub-page):

• apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/layout.tsx: line 88
• apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/page.tsx: line 424
• apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/analytics/page.tsx: lines 293, 305
• apps/dashboard/src/app/(app)/(dashboard)/(chain)/components/server/products.ts: line 52
• apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/BuyFundsSection.tsx: line 56
• apps/dashboard/src/components/pay/PayConfig.tsx: line 117

You can run rg "portal\\.thirdweb\\.com/connect/pay" to locate all remaining instances. Replace these with the simplified /pay URL (or the correct new paths) so all documentation links resolve consistently.

🤖 Prompt for AI Agents
In
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/layout.tsx
at lines 36 and 88, update all documentation URLs from the old structure
"portal.thirdweb.com/connect/pay/..." to the new simplified URL
"https://portal.thirdweb.com/pay" to ensure consistency. Verify the new URL is
accessible and replace all instances of the old URL within this file
accordingly.

Comment on lines 674 to 704
import { ThirdwebProvider } from "thirdweb/react";
// Import all the components we defined earlier
import { NFTCheckout, WalletAuth, PaymentOptions, ProcessingStep, SuccessStep, ErrorStep } from "./nft-checkout-components";

function App() {
return (
<ThirdwebProvider>
<div className="min-h-screen bg-gradient-to-br from-purple-50 to-blue-50 py-8">
<div className="container mx-auto px-4">
<header className="text-center mb-8">
<h1 className="text-4xl font-bold text-gray-800 mb-2">
NFT Marketplace
</h1>
<p className="text-gray-600">
Buy NFTs seamlessly with fiat currency
</p>
</header>

<NFTCheckout />

<footer className="text-center mt-8 text-sm text-gray-500">
<p>Powered by thirdweb Universal Bridge</p>
</footer>
</div>
</div>
</ThirdwebProvider>
);
}

export default App;
```
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

Missing component file creation instructions
The final integration imports NFTCheckout and related components from "./nft-checkout-components", but there’s no guidance on creating that file. We need a preceding step instructing users to extract and export the previously defined snippets into nft-checkout-components.tsx (or similar), ensuring the import path is valid.

🤖 Prompt for AI Agents
In apps/portal/src/app/pay/guides/nft-checkout/page.mdx around lines 674 to 704,
the code imports NFTCheckout and related components from
"./nft-checkout-components" without instructions to create that file. Add a step
before this integration that instructs users to create a new file named
nft-checkout-components.tsx (or similar) where they should extract and export
all previously defined component snippets. Ensure this file is saved in the
correct directory so the import path "./nft-checkout-components" resolves
correctly.

Comment on lines +159 to +163
import { Bridge, NATIVE_TOKEN_ADDRESS, toWei, sendTransaction } from "thirdweb";
import { prepareContractCall } from "thirdweb";
import { mintTo } from "thirdweb/extensions/erc721";
import { useState, useEffect } from "react";

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

Missing and unused imports in checkout flow snippet

  • prepareContractCall is imported but never used.
  • The snippet references useActiveAccount, client, sepolia, nftContract, and NFT_METADATA without importing them.

Readers will encounter unresolved identifiers. Either remove the unused prepareContractCall import and add lines such as:

-import { prepareContractCall } from "thirdweb";
+// Remove unused import
+// import { prepareContractCall } from "thirdweb";

+// Add required imports for this snippet
+import { useActiveAccount } from "thirdweb/react";
+import { client, sepolia, nftContract, NFT_METADATA } from "./setup";

or consolidate all these into a single file in a clear setup step.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { Bridge, NATIVE_TOKEN_ADDRESS, toWei, sendTransaction } from "thirdweb";
import { prepareContractCall } from "thirdweb";
import { mintTo } from "thirdweb/extensions/erc721";
import { useState, useEffect } from "react";
import { Bridge, NATIVE_TOKEN_ADDRESS, toWei, sendTransaction } from "thirdweb";
// Remove unused import
// import { prepareContractCall } from "thirdweb";
// Add required imports for this snippet
import { useActiveAccount } from "thirdweb/react";
import { client, sepolia, nftContract, NFT_METADATA } from "./setup";
import { mintTo } from "thirdweb/extensions/erc721";
import { useState, useEffect } from "react";
🤖 Prompt for AI Agents
In apps/portal/src/app/pay/guides/nft-checkout/page.mdx around lines 159 to 163,
remove the unused import prepareContractCall to clean up the imports.
Additionally, add imports for useActiveAccount, client, sepolia, nftContract,
and NFT_METADATA to ensure all referenced identifiers in the checkout flow
snippet are defined and avoid unresolved identifier errors. Alternatively,
consolidate these imports into a single setup file and import that file here for
clarity and maintainability.

…to ensure proper rendering in documentation.
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 3, 2025 20:28 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 3, 2025 20:28 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www June 3, 2025 20:28 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 3, 2025 20:28 Inactive
@gregfromstl gregfromstl merged commit 8b32459 into main Jun 3, 2025
24 checks passed
@gregfromstl gregfromstl deleted the greg/tool-4668-clean-up-ub-docs branch June 3, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard. Portal Involves changes to the Portal (docs) codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant