[x] When user imports private key, also derive shielded keys (default path)
[x] Ensure any changes to custom path form are ignored for these
[x] Fixed issue with Zip32 derivation: As the shielded keys are derived from a private key (which was derived with either a default or custom path), shielded keys on import should be derived with the default Zip32 path /0' - in the future we can allow users to derive additional keys either by incrementing (/1') or providing a full path (e.g., /0'/1, etc.)
The confirmation page and View Keys views are automatically updated, as the private key account (which seeds the shielded keys) is also treated as a parent.
Testing
Start with a new extension install (Optional)
Import or generate Mnemonic account (ensure existing functionality remains)
Import another account from Private Key (can use: 00bebb118517e09c950841d849eb3e07e27e6cb9c59a8e71179220fa570d5d770f) - should receive a shielded address
Import mnemonic with custom path (existing functionality)
Delete private key account, and then Add Keys - In the Import Mnemonic page under Advanced, set a custom path, then go to Private Key and import a private key as usual - this is to ensure that the custom path you entered is ignored when you import from private key (you shouldn't see a custom path here, because it is a default path)
Following all of this, it's good to check in the console with await namada.accounts() and inspect the accounts, ensuring:
Shielded accounts' parent IDs line up with their parents
Resolves #1231
/0'
- in the future we can allow users to derive additional keys either by incrementing (/1'
) or providing a full path (e.g.,/0'/1
, etc.)The confirmation page and
View Keys
views are automatically updated, as the private key account (which seeds the shielded keys) is also treated as a parent.Testing
00bebb118517e09c950841d849eb3e07e27e6cb9c59a8e71179220fa570d5d770f
) - should receive a shielded addressAdd Keys
- In the Import Mnemonic page underAdvanced
, set a custom path, then go toPrivate Key
and import a private key as usual - this is to ensure that the custom path you entered is ignored when you import from private key (you shouldn't see a custom path here, because it is a default path)Following all of this, it's good to check in the console with
await namada.accounts()
and inspect the accounts, ensuring:Screenshots
Private-key import confirmation:
View Keys