Installer: let user choose derivation path#1705
Installer: let user choose derivation path#1705edouardparis merged 2 commits intowizardsardine:masterfrom
Conversation
4c08ab5 to
611a3e8
Compare
|
I would not use the warning icon but the tooltip one ( Also I do not understand why incrementing account index makes the derivation path not standard. |
cc @bigspider |
|
Not sure what do you mean? Account numbers for the various supported BIPs are considered standard by the Ledger app if not larger than 100. |
133abdb to
c0c863a
Compare
|
fixed my mistake, the index stored was Unhardened |
| } | ||
|
|
||
| pub fn derivation_path(network: Network, account: ChildNumber) -> DerivationPath { | ||
| assert!(account.is_hardened()); |
There was a problem hiding this comment.
Note: added this assert to catch if an unhardened derivation path is used
There was a problem hiding this comment.
nit: I feel it might be slightly better to return an Option or Result here and let the caller unwrap it.
19afe39 to
e2e411f
Compare
48f98e3 to
b09fa49
Compare
b09fa49 to
7d6fce8
Compare
| version.as_ref(), | ||
| *fingerprint, | ||
| alias.as_ref(), | ||
| accounts.get(fingerprint).cloned(), |
There was a problem hiding this comment.
nit: could also use .copied()
| } | ||
|
|
||
| pub fn derivation_path(network: Network, account: ChildNumber) -> DerivationPath { | ||
| assert!(account.is_hardened()); |
There was a problem hiding this comment.
nit: I feel it might be slightly better to return an Option or Result here and let the caller unwrap it.
| impl Account { | ||
| pub fn new(index: ChildNumber, fingerprint: Fingerprint) -> Self { | ||
| Self { | ||
| hardened_index: index, |
There was a problem hiding this comment.
nit: possibly there should be a check that the index argument is hardened given the field name, or otherwise I think you can rename the field back to index, which should be fine now that the type is ChildNumber.
There was a problem hiding this comment.
hardened_index => index
| let source = Row::new() | ||
| .push(p1_regular("Select the source of your key").bold()) | ||
| .push(Space::with_width(10)) | ||
| .push(info) |
There was a problem hiding this comment.
nit: I feel this tooltip would be more visible if it were next to the pick list within the HW card. Same applies for "Share Xpubs" below.
There was a problem hiding this comment.
this have been request by @edouardparis previously and ACK'd by @nondiremanuel iirc
I don't think it worth bother w/ Option/Result here, it's intended to catch an error at implementation time not at run time |
7d6fce8 to
386c14c
Compare
386c14c to
5a05a84
Compare
5a05a84 to
626eaa1
Compare
fixed these 2 issues |
626eaa1 to
ce8e1f3
Compare
fixed this issue |





This PR closes #1700.