-
Notifications
You must be signed in to change notification settings - Fork 619
[BLD-228] SDK/React: Do not exclude specified wallets from all wallets list in Connect UI #7974
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
WalkthroughRemoved Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant ConnectModal as ConnectModalContent / WalletAuth
participant AllWalletsUI
participant WalletData as walletInfos
User->>ConnectModal: Open "All wallets"
ConnectModal->>AllWalletsUI: Render (without specifiedWallets)
AllWalletsUI->>WalletData: Load walletInfos
Note over AllWalletsUI,WalletData #EFE8D8: Filter out ids: "inApp", "embedded", "smart"
WalletData-->>AllWalletsUI: walletList (static, memoized on mount)
AllWalletsUI-->>User: Display list and handle search
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
💤 Files with no reviewable changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
There was a problem hiding this 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)
41-45: Centralize excluded wallet ids; current change fixes the bug but hard-codes ids inlineGood call removing specifiedWallets so “All wallets” truly includes wallets also shown in recommended. Replace the inline id checks with a shared Set for readability and easier maintenance.
Manual QA: In the playground, ensure searching for a wallet that appears in “Popular/Recommended” now also returns it under “All wallets”.
Apply this diff locally:
- return walletInfos.filter( - (info) => - info.id !== "inApp" && info.id !== "embedded" && info.id !== "smart", - ); + return walletInfos.filter((info) => !EXCLUDED_WALLET_IDS.has(info.id));Add this near the top of the file (or in a shared constants module if one exists):
const EXCLUDED_WALLET_IDS = new Set(["inApp", "embedded", "smart"]);
63-69: Preserve Fuse ranking when searching; sort only for the non-search caseRe-sorting after Fuse can surface “recommended” above best matches and subtly regress search quality. Gate sort by search presence.
-const walletInfosToShow = useMemo(() => { - return sortWallets(searchResults.slice(0, itemsToShow)); -}, [searchResults, itemsToShow]); +const walletInfosToShow = useMemo(() => { + const sliced = searchResults.slice(0, itemsToShow); + return deferredSearchTerm ? sliced : sortWallets(sliced); +}, [searchResults, itemsToShow, deferredSearchTerm]);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx(1 hunks)packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectModalContent.tsx(0 hunks)packages/thirdweb/src/react/web/wallets/in-app/WalletAuth.tsx(0 hunks)
💤 Files with no reviewable changes (2)
- packages/thirdweb/src/react/web/wallets/in-app/WalletAuth.tsx
- packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectModalContent.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@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless 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@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless 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
**/*.{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/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling@exampleand 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
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#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
Learnt from: CR
PR: thirdweb-dev/js#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: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/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Size
- GitHub Check: Unit Tests
- GitHub Check: Lint Packages
- GitHub Check: Analyze (javascript)
size-limit report 📦
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7974 +/- ##
==========================================
+ Coverage 56.52% 56.54% +0.01%
==========================================
Files 904 904
Lines 58633 58626 -7
Branches 4147 4148 +1
==========================================
+ Hits 33144 33149 +5
+ Misses 25383 25371 -12
Partials 106 106
🚀 New features to boost your workflow:
|
Merge activity
|
…s list in Connect UI (#7974) <!-- ## 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 `specifiedWallets` prop from various components related to wallet selection in the `thirdweb` package, streamlining the wallet filtering logic. ### Detailed summary - Removed `specifiedWallets` prop from the `WalletAuth` component. - Updated `ConnectModalContent` to remove `specifiedWallets` and utilize `recommendedWallets`. - Modified `AllWalletsUI` to eliminate `specifiedWallets` and simplify wallet filtering logic. > ✨ 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 - Refactor - Simplified the wallet selection list to a standardized set across the Connect modal and in-app auth. - Removed custom list filtering, ensuring a consistent experience regardless of entry point. - The list now excludes in-app, embedded, and smart wallets from the “All Wallets” view. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
cf8f80b to
dbb2614
Compare

PR-Codex overview
This PR focuses on removing the
specifiedWalletsproperty from various components related to wallet selection, simplifying the filtering logic in theAllWalletsUIcomponent.Detailed summary
specifiedWalletsprop fromWalletAuth.tsx.specifiedWalletsprop fromConnectModalContent.tsx.specifiedWalletstype declaration fromAllWalletsUI.tsx.AllWalletsUIto exclude certain wallet IDs.Summary by CodeRabbit