-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Summary
The QR code generation for Avalanche currently only includes account 0 for X/P chains. This prevents users from using multiple accounts with air-gapped Keystone devices.
Current Behavior
In src/ui/gui_wallet/multi/web3/gui_wallet.c, the GuiGetCoreWalletData function hardcodes only account 0:
ChainPath_t chainPaths[] = {
{.path = "m/44'/60'/0'", .chainType = XPUB_TYPE_ETH_BIP44_STANDARD},
{.path = "m/44'/9000'/0'", .chainType = XPUB_TYPE_AVAX_X_P},
};Expected Behavior
Support multiple accounts (e.g., 0-9) similar to how Ledger Live accounts are handled:
for (int i = XPUB_TYPE_ETH_LEDGER_LIVE_0; i <= XPUB_TYPE_ETH_LEDGER_LIVE_9; i++) {
// includes accounts 0-9
}Impact
- Users can only use account 0 for X/P chain operations when connecting via QR code
- Adding additional accounts results in those accounts not having X/P chain addresses
- This affects cross-chain transfers and P-chain staking for accounts beyond the first one
Proposed Solution
- Add new XPUB types:
XPUB_TYPE_AVAX_X_P_0throughXPUB_TYPE_AVAX_X_P_9 - Update the QR generation to include multiple Avalanche account xpubs
- The Rust code in
rust/apps/wallets/src/core_wallet.rsalready supports paths starting with44'/9000'/so it should work once the C code provides multiple keys
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels