Skip to content

Commit

Permalink
fix filter wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvoskamp committed Feb 2, 2024
1 parent ae5cae0 commit 3a5715e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/scaffold/src/views/w3m-connect-view/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,10 @@ export class W3mConnectView extends LitElement {
}

private filterOutDuplicateWallets(wallets: WcWallet[]) {
const { connectors } = ConnectorController.state
const recent = StorageUtil.getRecentWallets()
const recentIds = recent.map(wallet => wallet.id)
const rdnsIds = connectors.map(c => c.info?.rdns).filter(Boolean)
const filtered = wallets.filter(
wallet => !recentIds.includes(wallet.id) && !rdnsIds.includes(wallet.rdns ?? undefined)
)

const filtered = wallets.filter(wallet => !recentIds.includes(wallet.id))

return filtered
}
Expand Down

0 comments on commit 3a5715e

Please sign in to comment.