Skip to content

Commit

Permalink
fix: non announced connectors filtered as repeated (#2907)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomiir authored Sep 23, 2024
1 parent c7ad1b0 commit b35af73
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .changeset/polite-dogs-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
'@reown/appkit-scaffold-ui': patch
'@apps/demo': patch
'@apps/gallery': patch
'@apps/laboratory': patch
'@examples/html-ethers': patch
'@examples/html-ethers5': patch
'@examples/html-wagmi': patch
'@examples/next-ethers': patch
'@examples/next-wagmi': patch
'@examples/react-ethers': patch
'@examples/react-ethers5': patch
'@examples/react-solana': patch
'@examples/react-wagmi': patch
'@examples/vue-ethers5': patch
'@examples/vue-solana': patch
'@examples/vue-wagmi': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-polkadot': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-ethers': patch
'@reown/appkit-ethers5': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-siwe': patch
'@reown/appkit-solana': patch
'@reown/appkit-ui': patch
'@reown/appkit-wagmi': patch
'@reown/appkit-wallet': patch
---

Fixes issue where featured wallet ids were being filtered out if their connector was present but not displayed. eg. SDK Connectors.
4 changes: 3 additions & 1 deletion packages/scaffold-ui/src/utils/WalletUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export const WalletUtil = {
},

filterOutDuplicatesByIds(wallets: WcWallet[]) {
const connectors = ConnectorController.state.connectors
const connectors = ConnectorController.state.connectors.filter(
connector => connector.type === 'ANNOUNCED' || connector.type === 'INJECTED'
)
const recent = StorageUtil.getRecentWallets()

const connectorIds = connectors.map(connector => connector.explorerId)
Expand Down

0 comments on commit b35af73

Please sign in to comment.