Skip to content

Commit dbb2614

Browse files
committed
[BLD-228] SDK/React: Do not exclude specified wallets from all wallets 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 -->
1 parent b8f4966 commit dbb2614

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import { WalletEntryButton } from "../WalletEntryButton.js";
2828
function AllWalletsUI(props: {
2929
onBack: () => void;
3030
onSelect: (wallet: Wallet) => void;
31-
specifiedWallets: Wallet[];
3231
size: "compact" | "wide";
3332
client: ThirdwebClient;
3433
recommendedWallets: Wallet[] | undefined;
@@ -39,17 +38,11 @@ function AllWalletsUI(props: {
3938
const setSelectionData = useSetSelectionData();
4039

4140
const walletList = useMemo(() => {
42-
return walletInfos
43-
.filter((wallet) => {
44-
return (
45-
props.specifiedWallets.findIndex((x) => x.id === wallet.id) === -1
46-
);
47-
})
48-
.filter(
49-
(info) =>
50-
info.id !== "inApp" && info.id !== "embedded" && info.id !== "smart",
51-
);
52-
}, [props.specifiedWallets]);
41+
return walletInfos.filter(
42+
(info) =>
43+
info.id !== "inApp" && info.id !== "embedded" && info.id !== "smart",
44+
);
45+
}, []);
5346

5447
const fuseInstance = useMemo(() => {
5548
return new Fuse(walletList, {

packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectModalContent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ export const ConnectModalContent = (props: {
173173
onSelect={setScreen}
174174
recommendedWallets={props.recommendedWallets}
175175
size={props.size}
176-
specifiedWallets={props.wallets}
177176
/>
178177
</Suspense>
179178
);

packages/thirdweb/src/react/web/wallets/in-app/WalletAuth.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export function WalletAuth(props: {
104104
}}
105105
recommendedWallets={undefined}
106106
size={props.size}
107-
specifiedWallets={[]}
108107
/>
109108
</Suspense>
110109
);

0 commit comments

Comments
 (0)