Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Oct 22, 2025


PR-Codex overview

This PR modifies the BuyWidget component to allow users to bypass wallet connection if a receiverAddress is provided. It introduces a new condition for displaying the connection button based on the presence of the receiverAddress.

Detailed summary

  • Updated BuyWidget logic to not require wallet connection if receiverAddress is set.
  • Removed activeWalletInfo dependency for displaying the wallet connection button in BridgeWidgetContent.
  • Introduced showConnectButton in FundWallet to determine if the connect button should be shown based on receiverAddress.

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

Summary by CodeRabbit

  • Bug Fixes
    • BuyWidget no longer requires wallet connection when a receiver address is preset, enabling streamlined transactions in applicable scenarios.

@linear
Copy link

linear bot commented Oct 22, 2025

@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2025

🦋 Changeset detected

Latest commit: 49824ce

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

@vercel
Copy link

vercel bot commented Oct 22, 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 22, 2025 10:56pm
nebula Ready Ready Preview Comment Oct 22, 2025 10:56pm
thirdweb_playground Ready Ready Preview Comment Oct 22, 2025 10:56pm
thirdweb-www Ready Ready Preview Comment Oct 22, 2025 10:56pm
wallet-ui Ready Ready Preview Comment Oct 22, 2025 10:56pm

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

MananTank commented Oct 22, 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 22, 2025

Walkthrough

BuyWidget no longer requires an active wallet on the initial "1:buy-ui" screen; FundWallet now decides whether to show a ConnectButton by checking both receiverAddress and activeWalletInfo, otherwise rendering the Continue button.

Changes

Cohort / File(s) Summary
Changeset Documentation
/.changeset/light-signs-send.md
Adds a patch release entry documenting that BuyWidget no longer requires wallet connection when receiverAddress is set.
BuyWidget Component
packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
Removed useActiveWalletInfo usage and wallet-presence gating so FundWallet renders whenever screen.id === "1:buy-ui".
FundWallet Component
packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
Adds showConnectButton condition: show ConnectButton only when receiverAddress is absent AND activeWalletInfo is absent; otherwise render Continue button.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant BuyWidget
    participant FundWallet

    rect rgb(240,248,255)
    Note over BuyWidget,FundWallet: New control flow on "1:buy-ui"
    User->>BuyWidget: Open BuyWidget
    BuyWidget->>FundWallet: Render (no wallet gating)
    FundWallet->>FundWallet: Evaluate: receiverAddress? and activeWalletInfo?
    alt receiverAddress present OR activeWalletInfo present
        FundWallet->>User: Show Continue button
    else both missing
        FundWallet->>User: Show Connect button
    end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description leaves the provided template entirely blank and instead only includes an automated PR-Codex overview, omitting the required title line, “Notes for the reviewer” section, and “How to test” instructions. This means key contextual and testing information is missing, preventing reviewers from understanding how to validate the change. Please populate the template by adding a concise PR title at the top, a “Notes for the reviewer” section explaining any important context or decisions, and a “How to test” section outlining steps to verify the new behavior in the UI or via automated tests.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title “[MNY-286] SDK: Do not require connecting wallet in BuyWidget if receiverAddress is set” clearly references the linked issue, specifies the SDK component, and concisely describes the main behavioral change without extraneous details. It accurately summarizes the core update so teammates scanning the history can immediately understand the purpose of the pull request.
Linked Issues Check ✅ Passed The changes to BuyWidget and FundWallet update the conditional logic so that if a receiverAddress is provided, the wallet connection prompt is skipped and the continue button is shown, which directly fulfills the objective of linked issue MNY-286 to bypass wallet connection when receiverAddress is set.
Out of Scope Changes Check ✅ Passed All modifications are confined to the BuyWidget and FundWallet components and the changelog entry, exclusively targeting the wallet connection behavior based on receiverAddress. There are no unrelated or extraneous changes outside this scope.
✨ 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 10-23-_mny-286_sdk_do_not_require_connecting_wallet_in_if_is_set

📜 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 77e1de7 and 49824ce.

📒 Files selected for processing (3)
  • .changeset/light-signs-send.md (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .changeset/light-signs-send.md
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{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
**/*.{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/**/*.{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
🧬 Code graph analysis (1)
packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (2)
packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButton.tsx (1)
  • ConnectButton (301-424)
packages/thirdweb/src/react/core/design-system/index.ts (1)
  • radius (188-196)
⏰ 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: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (1)

289-335: Conditional CTA cleanly enforces the new receiver override rule.

Great job narrowing the connect prompt to the one case where it’s actually required—no receiver override and no active wallet. This keeps the “Buy” flow available when a receiverAddress is preset without losing the ability to connect when needed.

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.

@MananTank MananTank changed the title [MNY-286] SDK: Do not require connecting wallet in if is set [MNY-286] SDK: Do not require connecting wallet in BuyWidget if receiverAddress is set Oct 22, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 22, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.55 KB (0%) 1.3 s (0%) 158 ms (+208.2% 🔺) 1.5 s
thirdweb (cjs) 365.82 KB (0%) 7.4 s (0%) 637 ms (+30.76% 🔺) 8 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 83 ms (+3685.28% 🔺) 197 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 68 ms (+2980.55% 🔺) 78 ms
thirdweb/react (minimal + tree-shaking) 19.09 KB (0%) 382 ms (0%) 70 ms (+2664.27% 🔺) 451 ms

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.91%. Comparing base (706d696) to head (49824ce).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...es/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx 0.00% 14 Missing ⚠️
...ges/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8296      +/-   ##
==========================================
- Coverage   54.92%   54.91%   -0.02%     
==========================================
  Files         919      919              
  Lines       60665    60664       -1     
  Branches     4141     4135       -6     
==========================================
- Hits        33322    33313       -9     
- Misses      27240    27249       +9     
+ Partials      103      102       -1     
Flag Coverage Δ
packages 54.91% <0.00%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
...ges/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx 5.55% <0.00%> (-0.29%) ⬇️
...es/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx 6.22% <0.00%> (-0.02%) ⬇️

... and 6 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.

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 22, 2025

Merge activity

…verAddress is set (#8296)

<!--

## 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 modifying the `BuyWidget` component to allow users to bypass wallet connection if a `receiverAddress` is provided. It updates the logic for displaying connection prompts based on the presence of this address.

### Detailed summary

- Updated `BuyWidget` to not require wallet connection if `receiverAddress` is set.
- Removed `activeWalletInfo` dependency from the condition for displaying the `FundWallet`.
- Introduced `showConnectButton` variable to determine if the connect button should be shown.
- Simplified the rendering logic for the connect button in `FundWallet`.

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

<!-- end pr-codex -->
@graphite-app graphite-app bot force-pushed the 10-23-_mny-286_sdk_do_not_require_connecting_wallet_in_if_is_set branch from 77e1de7 to 49824ce Compare October 22, 2025 22:19
@joaquim-verges joaquim-verges merged commit e978809 into main Oct 22, 2025
20 of 24 checks passed
@joaquim-verges joaquim-verges deleted the 10-23-_mny-286_sdk_do_not_require_connecting_wallet_in_if_is_set branch October 22, 2025 22:39
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.

3 participants