Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Nov 4, 2025

Fixes INC-149

Summary by CodeRabbit

  • Bug Fixes

    • Hidden wallet settings now consistently apply across all wallet selection screens; hidden wallets remain excluded throughout the connection flow.
  • Chores

    • Added a new changelog entry for a patch release.
  • Tests

    • Several indexer-related tests have been temporarily skipped and annotated for follow-up.

PR-Codex overview

This PR focuses on improving the handling of hidden wallets in the wallet connection modals and updating test cases related to event fetching.

Detailed summary

  • Added walletIdsToHide prop to ConnectModalContent.
  • Updated externalWallets filtering to include hidden wallets in ConnectModal.
  • Marked several tests as skipped due to issues with the indexer.
  • Enhanced AllWalletsUI to filter out hidden wallets based on walletIdsToHide.

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

@vercel
Copy link

vercel bot commented Nov 4, 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 Nov 4, 2025 8:45am
nebula Ready Ready Preview Comment Nov 4, 2025 8:45am
thirdweb_playground Ready Ready Preview Comment Nov 4, 2025 8:45am
thirdweb-www Ready Ready Preview Comment Nov 4, 2025 8:45am
wallet-ui Ready Ready Preview Comment Nov 4, 2025 8:45am

@changeset-bot
Copy link

changeset-bot bot commented Nov 4, 2025

🦋 Changeset detected

Latest commit: 326255c

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

@joaquim-verges joaquim-verges changed the title [thirdweb] Fix hiddenWallets prop not applying to all wallets screen [SDK] Fix hiddenWallets prop not applying to all wallets screen Nov 4, 2025
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Nov 4, 2025
Copy link
Member Author


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.

@joaquim-verges joaquim-verges marked this pull request as ready for review November 4, 2025 08:14
@linear
Copy link

linear bot commented Nov 4, 2025

@joaquim-verges joaquim-verges requested review from a team as code owners November 4, 2025 08:14
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2025

Walkthrough

Propagates hidden-wallet IDs through the connect UI and applies filtering so specified wallets are excluded from "All wallets" on web and native; also adds a changelog entry and skips several indexer-related event tests (marked TODO).

Changes

Cohort / File(s) Summary
Changelog Entry
.changeset/dark-ravens-end.md
Adds a patch changelog entry documenting the bug fix for hiddenWallets application across wallet screens.
Native UI filtering
packages/thirdweb/src/react/native/ui/connect/ConnectModal.tsx
External wallets list now excludes the in-app wallet and any wallet IDs present in the hiddenWallets prop.
Web UI propagation & filtering
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectModalContent.tsx
Adds optional walletIdsToHide?: WalletId[] prop to AllWalletsUI; imports WalletId; forwards walletIdsToHide from ConnectModalContent and filters wallets in AllWalletsUI, updating memo deps to include the hide list.
Tests skipped
packages/thirdweb/src/event/actions/get-events.test.ts
Several indexer-related tests are now skipped and annotated with TODOs instead of running.

Sequence Diagram(s)

sequenceDiagram
    participant UI as ConnectButton UI
    participant Modal as ConnectModalContent
    participant All as AllWalletsUI
    participant Native as ConnectModal (native)
    rect rgba(0,128,96,0.08)
    UI->>Modal: open modal (includes hiddenWallets)
    Note right of Modal: showAll screen forwards\nwalletIdsToHide to AllWalletsUI
    Modal->>All: render(allWallets, walletIdsToHide)
    All->>All: filter wallets\nexclude NON_SEARCHABLE & walletIdsToHide
    All-->>Modal: render filtered list
    end
    rect rgba(0,64,128,0.06)
    UI->>Native: open native modal (includes hiddenWallets)
    Native->>Native: filter external wallets\nexclude in-app + hiddenWallets
    Native-->>UI: render filtered list
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review filtering logic in AllWalletsUI and ConnectModal.tsx for correctness and edge cases (undefined/empty hide lists, unknown IDs).
  • Confirm memoization dependency array includes walletIdsToHide and triggers updates as intended.
  • Ensure WalletId type usage/import is correct and doesn't widen public API unexpectedly.
  • Verify parity between web and native behavior.
  • Check skipped tests in get-events.test.ts to confirm intent and add TODO follow-ups.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes unrelated changes: several tests in get-events.test.ts are skipped with TODO comments, which are outside the scope of fixing the hiddenWallets prop functionality. Remove the test skipping changes from get-events.test.ts or move them to a separate PR focused on test maintenance and indexer-related issues.
Description check ❓ Inconclusive The PR description includes the linked issue reference (INC-149) but lacks reviewer notes and testing details required by the repository template. Add explicit notes for reviewers and testing instructions (unit tests, playground, etc.) to complete the required sections of the PR description template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main bug fix: applying the hiddenWallets prop to the all wallets screen, which directly addresses the linked issue INC-149.
Linked Issues check ✅ Passed The code changes implement the required fix: hiddenWallets prop now properly filters wallets from the all wallets screen across ConnectModal, ConnectModalContent, and AllWalletsUI components.
✨ 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 _thirdweb_Fix_hiddenWallets_prop_not_applying_to_all_wallets_screen

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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

size-limit report 📦

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

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 (2)
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx (2)

30-39: Add explicit return type per coding guidelines.

The function declaration should include an explicit return type.

As per coding guidelines

Apply this diff:

-function AllWalletsUI(props: {
+function AllWalletsUI(props: {
   onBack: () => void;
   onSelect: (wallet: Wallet) => void;
   size: "compact" | "wide";
   client: ThirdwebClient;
   recommendedWallets: Wallet[] | undefined;
   connectLocale: ConnectLocale;
   disableSelectionDataReset?: boolean;
   walletIdsToHide?: WalletId[];
-}) {
+}): JSX.Element {

43-47: Filtering logic is correct and handles the fix properly.

The implementation correctly excludes wallets specified in walletIdsToHide while maintaining the existing NON_SEARCHABLE_WALLETS filter. The optional chaining and dependency array are correct.

For better performance if walletIdsToHide could contain many items, consider using a Set for O(1) lookup:

 const walletList = useMemo(() => {
+  const hideSet = props.walletIdsToHide ? new Set(props.walletIdsToHide) : null;
-  return walletInfos
-    .filter((info) => !NON_SEARCHABLE_WALLETS.includes(info.id))
-    .filter((info) => !props.walletIdsToHide?.includes(info.id));
+  return walletInfos.filter(
+    (info) =>
+      !NON_SEARCHABLE_WALLETS.includes(info.id) &&
+      (!hideSet || !hideSet.has(info.id))
+  );
 }, [props.walletIdsToHide]);

However, for typical use cases (hiding a handful of wallets), the current implementation is perfectly adequate.

📜 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 df82a14 and 326255c.

📒 Files selected for processing (5)
  • .changeset/dark-ravens-end.md (1 hunks)
  • packages/thirdweb/src/event/actions/get-events.test.ts (3 hunks)
  • packages/thirdweb/src/react/native/ui/connect/ConnectModal.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx (2 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectModalContent.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/thirdweb/src/react/native/ui/connect/ConnectModal.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectModalContent.tsx
  • .changeset/dark-ravens-end.md
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{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/ConnectWallet/Modal/AllWalletsUI.tsx
  • packages/thirdweb/src/event/actions/get-events.test.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/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx
  • packages/thirdweb/src/event/actions/get-events.test.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/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx
  • packages/thirdweb/src/event/actions/get-events.test.ts
**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.test.{ts,tsx}: Place tests alongside code: foo.tsfoo.test.ts
Use real function invocations with stub data in tests; avoid brittle mocks
Use Mock Service Worker (MSW) for fetch/HTTP call interception in tests
Keep tests deterministic and side-effect free
Use FORKED_ETHEREUM_CHAIN for mainnet interactions and ANVIL_CHAIN for isolated tests

**/*.test.{ts,tsx}: Co‑locate tests as foo.test.ts(x) next to the implementation
Use real function invocations with stub data; avoid brittle mocks
Use MSW to intercept HTTP calls for network interactions; mock only hard‑to‑reproduce scenarios
Keep tests deterministic and side‑effect free; use Vitest

Files:

  • packages/thirdweb/src/event/actions/get-events.test.ts
🧠 Learnings (10)
📓 Common learnings
Learnt from: joaquim-verges
Repo: thirdweb-dev/js PR: 7268
File: packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts:210-216
Timestamp: 2025-06-03T23:44:40.243Z
Learning: EIP7702 wallets do not need special handling for switching chains, unlike EIP4337 wallets which require reconnection when switching chains. In the switchChain method condition, EIP7702 should be intentionally excluded from the reconnection logic.
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Smart wallets with account abstraction
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Support for in-app wallets (social/email login)
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture

Applied to files:

  • packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Applied to files:

  • packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 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/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Support for in-app wallets (social/email login)

Applied to files:

  • packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Smart wallets with account abstraction

Applied to files:

  • packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx
📚 Learning: 2025-09-23T19:56:43.668Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 8106
File: packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx:482-485
Timestamp: 2025-09-23T19:56:43.668Z
Learning: In packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx, the EmbedContainer uses width: "100vw" intentionally rather than "100%" - this is by design for the bridge widget embedding use case.

Applied to files:

  • packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.ts`

Applied to files:

  • packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.test.{ts,tsx} : Keep tests deterministic and side-effect free

Applied to files:

  • packages/thirdweb/src/event/actions/get-events.test.ts
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to **/*.test.{ts,tsx} : Keep tests deterministic and side‑effect free; use Vitest

Applied to files:

  • packages/thirdweb/src/event/actions/get-events.test.ts
🧬 Code graph analysis (1)
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx (1)
packages/thirdweb/src/wallets/constants.ts (1)
  • NON_SEARCHABLE_WALLETS (10-15)
⏰ 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: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
packages/thirdweb/src/event/actions/get-events.test.ts (1)

174-244: Cannot fully verify scope mismatch claim without PR metadata.

The review comment makes specific claims about the PR's objective (fixing hiddenWallets prop), but I only have access to the code snippet showing the skipped tests. To verify whether these changes are truly unrelated to the stated PR objective, I would need:

  1. PR description and title — to confirm the actual scope
  2. Git history — to determine when/why these tests were skipped and by whom
  3. Related issues/tickets — to confirm if the indexer problem is tracked separately
  4. Commit message context — to understand the intent behind these changes

The review comment's concerns about test skipping and lack of issue tracking are valid if these tests were intentionally disabled for this PR. However, without access to PR metadata and commit history, I cannot confirm whether:

  • These changes belong in this PR or were accidentally included
  • The indexer tests were already skipped before this PR
  • There's a related issue already tracking the indexer problem
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx (1)

11-11: LGTM! Type import and prop addition are correct.

The WalletId type import and the new optional walletIdsToHide prop are properly typed and support the feature requirement.

Also applies to: 38-38

@joaquim-verges joaquim-verges merged commit ccdce49 into main Nov 4, 2025
18 of 21 checks passed
@joaquim-verges joaquim-verges deleted the _thirdweb_Fix_hiddenWallets_prop_not_applying_to_all_wallets_screen branch November 4, 2025 08:39
@joaquim-verges joaquim-verges mentioned this pull request Nov 4, 2025
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