Skip to content

Commit

Permalink
fix: filter duplicate wallets ids
Browse files Browse the repository at this point in the history
  • Loading branch information
lochie committed Feb 6, 2024
1 parent 6e18bc9 commit e398dfb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/connectkit/src/wallets/useWallets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export const useWallets = (): WalletProps[] => {

return (
wallets
// remove duplicate ids
.filter(
(wallet, index, self) =>
self.findIndex((w) => w.id === wallet.id) === index
)
// remove wallet with id coinbaseWalletSDK if wallet with id 'com.coinbase.wallet' exists
.filter(
(wallet, index, self) =>
Expand Down

0 comments on commit e398dfb

Please sign in to comment.