anza-xyz / wallet-standard

Solana extensions to the Wallet Standard.
Apache License 2.0
79 stars 42 forks source link

Unregister listener in `useStandardWalletAdapters` doing the opposite filtering #44

Open alex-fung opened 5 months ago

alex-fung commented 5 months ago

When unregistering a wallet, it seems to remove all wallets except for the one I tried to unregister in useStandardWalletAdapters. I think the filter is filtering for only the wallet I'm trying to unregister instead filtering for all the wallets but the one I'm trying to unregister.

In particular at https://github.com/anza-xyz/wallet-standard/blob/2c354cf07daa1d440ba9631fcefc5c00b07aa9dd/packages/wallet-adapter/react/src/useStandardWalletAdapters.ts#L20

should it be wallets.some((wallet) => wallet !== standardAdapter.wallet)?

(Aware that this isn't supposed to be used by dApps necessarily, but wanted to use it for some in-team testing purposes)

alex-fung commented 5 months ago

cc @jordaaash