File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
packages/thirdweb/src/react/web/ui/Bridge/payment-selection Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " thirdweb " : patch
3+ ---
4+
5+ Hides in-app wallets in the payment widgets if smart wallets are used
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import type { PayEmbedConnectOptions } from "../../PayEmbed.js";
2020import { FiatProviderSelection } from "./FiatProviderSelection.js" ;
2121import { TokenSelection } from "./TokenSelection.js" ;
2222import { WalletFiatSelection } from "./WalletFiatSelection.js" ;
23+ import { isSmartWallet } from "../../../../../wallets/smart/is-smart-wallet.js" ;
2324
2425export interface PaymentSelectionProps {
2526 /**
@@ -125,7 +126,7 @@ export function PaymentSelection({
125126 includeDestinationToken :
126127 includeDestinationToken ||
127128 receiverAddress ?. toLowerCase ( ) !==
128- payerWallet ?. getAccount ( ) ?. address ?. toLowerCase ( ) ,
129+ payerWallet ?. getAccount ( ) ?. address ?. toLowerCase ( ) ,
129130 payerWallet,
130131 } ) ;
131132
@@ -244,7 +245,8 @@ export function PaymentSelection({
244245 { currentStep . type === "walletSelection" && (
245246 < WalletFiatSelection
246247 client = { client }
247- connectedWallets = { connectedWallets }
248+ // We exclude in-app wallets if smart wallets are being used
249+ connectedWallets = { connectedWallets . some ( w => isSmartWallet ( w ) ) ? connectedWallets . filter ( w => w . id !== "inApp" ) : connectedWallets }
248250 onConnectWallet = { handleConnectWallet }
249251 onFiatSelected = { handleFiatSelected }
250252 onWalletSelected = { handleWalletSelected }
You can’t perform that action at this time.
0 commit comments