From 304e4e5be860e4989abf0493cb737f46e050a697 Mon Sep 17 00:00:00 2001 From: MananTank Date: Fri, 19 Dec 2025 19:29:48 +0000 Subject: [PATCH] [MNY-348] SDK: Remove in-app wallet from default wallet list for bridge widgets (#8579) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR focuses on enhancing wallet integration in bridge components by introducing custom wallet options and modifying default wallet selections for various widgets. ### Detailed summary - Removed in-app wallet from default wallet list for bridge widgets. - Added `CustomWallets` component in `BuyWidget.stories.tsx` and `SwapWidget.stories.tsx`. - Implemented `getDefaultWalletsForBridgeComponents` to return a list of wallets. - Updated `FundWallet`, `SwapUI`, and `TransactionPayment` components to use custom wallet options. - Introduced new wallet options in `TransactionWidget.stories.tsx`. - Added `CustomWallets` functionality in `BridgeWidget` stories. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .changeset/plain-maps-care.md | 5 + .../src/react/web/ui/Bridge/FundWallet.tsx | 8 ++ .../web/ui/Bridge/TransactionPayment.tsx | 8 ++ .../web/ui/Bridge/swap-widget/swap-ui.tsx | 8 ++ .../BridgeWidget/bridge-widget.stories.tsx | 98 +++++++++++++++++++ .../Bridge/Swap/SwapWidget.stories.tsx | 14 +++ .../Transaction/TransactionWidget.stories.tsx | 10 ++ .../src/stories/BuyWidget.stories.tsx | 12 +++ .../thirdweb/src/wallets/defaultWallets.ts | 22 +++++ 9 files changed, 185 insertions(+) create mode 100644 .changeset/plain-maps-care.md create mode 100644 packages/thirdweb/src/stories/Bridge/BridgeWidget/bridge-widget.stories.tsx diff --git a/.changeset/plain-maps-care.md b/.changeset/plain-maps-care.md new file mode 100644 index 00000000000..b6884215e2c --- /dev/null +++ b/.changeset/plain-maps-care.md @@ -0,0 +1,5 @@ +--- +"thirdweb": minor +--- + +Remove in-app wallet from default wallet list for bridge widgets" diff --git a/packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx b/packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx index 49ab3176391..b0c133a0619 100644 --- a/packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx +++ b/packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx @@ -15,6 +15,7 @@ import { isAddress, shortenAddress, } from "../../../../utils/address.js"; +import { getDefaultWalletsForBridgeComponents } from "../../../../wallets/defaultWallets.js"; import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js"; import { fontSize, @@ -299,6 +300,13 @@ export function FundWallet(props: FundWalletProps) { theme={theme} {...props.connectOptions} autoConnect={false} + wallets={ + props.connectOptions?.wallets || + getDefaultWalletsForBridgeComponents({ + appMetadata: props.connectOptions?.appMetadata, + chains: props.connectOptions?.chains, + }) + } /> ) : (