Open woodenfurniture opened 7 months ago
Ledger does not ship with a uniquely identifiable serial number on the device - they are all 0001
(privacy reasons possibly?).
Regardless, it seems storing account configuration keyed by wallet device ID is not desirable because its possible for a user to wipe their device and reinitialize with totally different seed, which when reconnected would have accountIds configured which do not exist for the device. This may not matter as far as account balances etc, since those accountIds wont be accessible by the device so will not appear in-app (we'd have to verify this is the case), but the configured chainIds that are visible throughout the app would have to check what accounts are actually accessible at runtime so as not to display a chainId for an account that is not longer accessible by the device corresponding to the device ID.
We may want to try one of the following:
For reference, this is whats available for a given ledger device:
To spike:
We can use the first connected account ID for each connected chain to detect if the wallet has changed since the seed it tied to the account derivation.
If the user connects a ledger, ask them to open one of the connectd apps, check the account ID matches, then conditionally proceed or push them into a new connect chains flow.
- can we auto open (and close / re-open) apps on ledger devices
- if so, this can be implemented in both connection / pairing flow and also to confirm device identity
- if not, lazy check of device identity on next wallet interaction (confirming account 0 matches expected account 0). If doesn't match prompt user. If match no action, proceed.
Remaining work - implement #7639 on other pages
Overview
The ledger device ID is the same for every device, meaning query cache using wallet
deviceId
will be invalid if a different ledger is connected.References and additional details
Originally noted here : https://github.com/shapeshift/web/pull/6780#discussion_r1588979619
Acceptance Criteria
Account management operates as intended across different ledger devices for all states and user flows.
SPIKE:
research #1 and create needed follow up tickets for 2 and 3 depending on out come.
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response