From 5d3b39587b56a7b1ad49accf26a4c9a311b12795 Mon Sep 17 00:00:00 2001 From: gregfromstl Date: Fri, 13 Sep 2024 18:37:29 +0000 Subject: [PATCH] [React] Feature: Can hide certain wallets in the wallet switcher (#4582) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the ability to hide certain wallets in the wallet switcher ```tsx ``` --- ## PR-Codex overview The focus of this PR is to add the ability to hide specific wallets in the wallet switcher UI component. ### Detailed summary - Added `hiddenWallets` prop to `ConnectButton`, `DetailsModal`, `WalletSwitcherConnectionScreen`, `BuyScreen`, and `PayEmbed` components. - Implemented filtering of connected wallets based on `hiddenWallets` in `WalletManagerScreen` and `WalletSwitcherDrawerContent`. - Updated types to include `WalletId` for consistency across components. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .changeset/perfect-poems-scream.md | 19 ++++++++++ .../connect-smart-account.tsx | 4 ++ .../hooks/connection/ConnectButtonProps.ts | 6 +++ .../web/ui/ConnectWallet/ConnectButton.tsx | 1 + .../react/web/ui/ConnectWallet/Details.tsx | 4 ++ .../ConnectWallet/screens/Buy/BuyScreen.tsx | 5 +++ .../Buy/swap/WalletSwitcherDrawerContent.tsx | 38 ++++++++++--------- .../screens/Details/WalletManagerScreen.tsx | 32 ++++++++-------- .../WalletSwitcherConnectionScreen.tsx | 2 + .../thirdweb/src/react/web/ui/PayEmbed.tsx | 9 ++++- 10 files changed, 87 insertions(+), 33 deletions(-) create mode 100644 .changeset/perfect-poems-scream.md diff --git a/.changeset/perfect-poems-scream.md b/.changeset/perfect-poems-scream.md new file mode 100644 index 000000000..a39976b99 --- /dev/null +++ b/.changeset/perfect-poems-scream.md @@ -0,0 +1,19 @@ +--- +"thirdweb": patch +--- + +Adds the ability to hide certain wallets in the wallet switcher + +```tsx + +``` diff --git a/apps/playground-web/src/components/account-abstraction/connect-smart-account.tsx b/apps/playground-web/src/components/account-abstraction/connect-smart-account.tsx index 2795fc588..ba092e310 100644 --- a/apps/playground-web/src/components/account-abstraction/connect-smart-account.tsx +++ b/apps/playground-web/src/components/account-abstraction/connect-smart-account.tsx @@ -18,6 +18,10 @@ export function ConnectSmartAccountPreview() { return (