Currently the wallet plugin provides a filtered list of wallets that can be connected to:
function filterWallet(uiWallet: UiWallet): boolean {
const supportsChain = uiWallet.chains.includes(config.chain);
const supportsConnect = uiWallet.features.includes(StandardConnect);
if (!supportsChain || !supportsConnect) return false;
return config.filter ? config.filter(uiWallet) : true;
}
function buildWalletList(): readonly UiWallet[] {
return Object.freeze(registry.get().map(getOrCreateUiWalletForStandardWallet).filter(filterWallet));
}
This affects both the wallets list (only includes those that pass the filter), and autoconnect (if the previously connected wallet is now filtered out, we don't reconnect to it)
This is definitely the right default for most apps. But the react-app example in Kit instead renders unconnectable wallets with a warning indicator. This would not be easy to do with the wallet plugin, you'd need to use wallet-standard get() directly and compare the lists to find what's been filtered out.
If anyone wants this, it should be easy to add allWallets to the state, or potentially add filteredWallets for just the filtered ones, which might be more useful and would be simpler because it wouldn't need to churn when the not-filtered-out wallets change.
Just opening as an issue for now though, not sure anyone will need it.
Currently the wallet plugin provides a filtered list of wallets that can be connected to:
This affects both the
walletslist (only includes those that pass the filter), and autoconnect (if the previously connected wallet is now filtered out, we don't reconnect to it)This is definitely the right default for most apps. But the react-app example in Kit instead renders unconnectable wallets with a warning indicator. This would not be easy to do with the wallet plugin, you'd need to use
wallet-standardget()directly and compare the lists to find what's been filtered out.If anyone wants this, it should be easy to add
allWalletsto the state, or potentially addfilteredWalletsfor just the filtered ones, which might be more useful and would be simpler because it wouldn't need to churn when the not-filtered-out wallets change.Just opening as an issue for now though, not sure anyone will need it.