File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
packages/thirdweb/src/react/web/ui/Bridge/payment-selection Expand file tree Collapse file tree 2 files changed +12
-1
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 @@ -8,6 +8,7 @@ import type { ThirdwebClient } from "../../../../../client/client.js";
88import type { Address } from "../../../../../utils/address.js" ;
99import { toUnits } from "../../../../../utils/units.js" ;
1010import type { Wallet } from "../../../../../wallets/interfaces/wallet.js" ;
11+ import { isSmartWallet } from "../../../../../wallets/smart/is-smart-wallet.js" ;
1112import { usePaymentMethods } from "../../../../core/hooks/usePaymentMethods.js" ;
1213import { useActiveWallet } from "../../../../core/hooks/wallets/useActiveWallet.js" ;
1314import { useConnectedWallets } from "../../../../core/hooks/wallets/useConnectedWallets.js" ;
@@ -244,7 +245,12 @@ 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 = {
250+ connectedWallets . some ( ( w ) => isSmartWallet ( w ) )
251+ ? connectedWallets . filter ( ( w ) => w . id !== "inApp" )
252+ : connectedWallets
253+ }
248254 onConnectWallet = { handleConnectWallet }
249255 onFiatSelected = { handleFiatSelected }
250256 onWalletSelected = { handleWalletSelected }
You can’t perform that action at this time.
0 commit comments