-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add network bounds / is hardware to accounts.subscribe callback #1192
Comments
Generally the focus is on Both these
I agree it could be useful to somehow roll this out to eg. lower-level subscribe as well, however that obviously has some thinking required for backwards compatibility. (And obviously if different extensions implement their own subscribe, aka it is not polyfilled like we do for those that don't in So maybe for the future if we can find some workarounds for the various incarnations. |
Thank you, this is useful. The issue I faced with |
There is a limitation with hardware-wallet imported accounts that's not only subject to Polkadot JS extension, but to the
injectedWeb3
accountssubscribe
spec being used.Ledger devices sandbox accounts to 1 network, and will therefore only work for that 1 network. The issue is that the network(s) an address is "bound to" are not communicated in the
injectedWeb3 accounts.subscribe
API. When Isubscribe
to the accounts of the extension, apps need to know the supported networks in order to display or ignore the account correctly, depending on the active network within the app.Proposed solution would be to include optional
hardware?: ledger_nano_s | <other>
to signify account is from a hardware wallet, andnetworks?: Array<string>
properties within the returned account list that returns a list of networks supported by the address. Perhaps the names adhere to the same spec as Ledger Substrate JS.This would also be useful if we wanted to roll out Ledger support on only one network - say Polkadot, whereby the Polkadot-only accounts only use the Polkadot Ledger app & accounts will only be displayed when on that network.
A practical use case: The Polkadot Ledger app just rolled out nesting support for all the staking functions used in staking dashboard. Kusama does not support such yet - we need to therefore silo Polkadot hw support from Kusama hw support.
The text was updated successfully, but these errors were encountered: