-
Couldn't load subscription status.
- Fork 16
Description
Problem
Users can connect a Keystone wallet during the onboarding process by selecting:
- Access Existing Wallet → Add using Keystone → Select your device
However, after the wallet is set up, there is no way to connect a Keystone wallet retroactively. When users click the "Add Account or Connect Wallet" button in the account management screen, the dropdown menu does not include a Keystone option.
Currently, the menu includes:
- Import Private Key
- Connect using Wallet Connect
- Import Recovery Phrase
- Import Ledger Wallet
- Import Keystore File
- Create New Account
The only workaround is to remove and reinstall the extension, then select Keystone during "onboarding".
Expected Behavior
Users should be able to connect a Keystone wallet post-onboarding through the "Add Account or Connect Wallet" menu, similar to how Ledger wallet connection is supported.
Proposed Solution
Add a "Connect Keystone Wallet" option to the account management dropdown menu in apps/legacy/src/pages/Accounts/components/AccountsActionButton.tsx (and the equivalent in the next app), gated by the appropriate feature flags (FeatureGates.KEYSTONE or FeatureGates.KEYSTONE_3).
The option should:
- Use the
KeystoneIconcomponent - Navigate to the appropriate Keystone connection flow (USB or QR-based, depending on feature flags)
- Follow the same pattern as the existing "Import Ledger Wallet" option (lines 318-349)
Code References
- Onboarding flow with Keystone support: https://github.com/ava-labs/core-extension/blob/main/apps/legacy/src/pages/Onboarding/pages/Seedless/components/ExistingWalletOptions.tsx#L73-L89
- Post-onboarding menu without Keystone: https://github.com/ava-labs/core-extension/blob/main/apps/legacy/src/pages/Accounts/components/AccountsActionButton.tsx
- Ledger post-onboarding example: https://github.com/ava-labs/core-extension/blob/main/apps/legacy/src/pages/Accounts/components/AccountsActionButton.tsx#L318-L349