Skip to content

Commit fecaa66

Browse files
Fix inapp wallets showing up in all wallets list
1 parent f3234c3 commit fecaa66

File tree

3 files changed

+26
-13
lines changed

3 files changed

+26
-13
lines changed

.changeset/tangy-otters-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix inapp wallets showing up in all wallets list

packages/thirdweb/src/react/native/ui/connect/ExternalWalletsList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export function AllWalletsList(
100100
.filter(
101101
(info) => !externalWallets.find((wallet) => wallet.id === info.id),
102102
)
103+
.filter((info) => info.id !== "inApp" && info.id !== "embedded" && info.id !== "smart")
103104
.filter((info) => info.hasMobileSupport);
104105

105106
const fuse = new Fuse(filteredWallets, {

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

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,16 @@ function AllWalletsUI(props: {
3939
const setSelectionData = useSetSelectionData();
4040

4141
const walletList = useMemo(() => {
42-
return walletInfos.filter((wallet) => {
43-
return props.specifiedWallets.findIndex((x) => x.id === wallet.id) === -1;
44-
});
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+
);
4552
}, [props.specifiedWallets]);
4653

4754
const fuseInstance = useMemo(() => {
@@ -183,15 +190,15 @@ function AllWalletsUI(props: {
183190
);
184191
}
185192

186-
const StyledMagnifyingGlassIcon = /* @__PURE__ */ styled(MagnifyingGlassIcon)(
187-
(_) => {
188-
const theme = useCustomTheme();
189-
return {
190-
color: theme.colors.secondaryText,
191-
left: spacing.sm,
192-
position: "absolute",
193-
};
194-
},
195-
);
193+
const StyledMagnifyingGlassIcon = /* @__PURE__ */ styled(MagnifyingGlassIcon)((
194+
_
195+
) => {
196+
const theme = useCustomTheme();
197+
return {
198+
color: theme.colors.secondaryText,
199+
left: spacing.sm,
200+
position: "absolute",
201+
};
202+
});
196203

197204
export default AllWalletsUI;

0 commit comments

Comments
 (0)