Merge #579: installer: disallow xpub with appended derivation path
869f3ec3d2c6b4f367f8b23f3e45dbfe1ae9fdf1 installer: disallow xpub with-appended derivation path (edouard) Pull request description: close #576 ACKs for top commit: darosior: ACK 869f3ec3d2c6b4f367f8b23f3e45dbfe1ae9fdf1 Tree-SHA512: 03ee06c1f54047015239175f7b62aabed7eb02b2ebed5d403c773dca3033d62c838cfbf621ee1aad81b4302334df81ed7fbfc63162723fd352cc9382bbc807cf
This commit is contained in:
commit
7b6468c72f
@ -883,7 +883,9 @@ impl DescriptorEditModal for EditXpubModal {
|
||||
message::ImportKeyModal::XPubEdited(s) => {
|
||||
if let Ok(DescriptorPublicKey::XPub(key)) = DescriptorPublicKey::from_str(&s) {
|
||||
self.chosen_signer = None;
|
||||
if let Some((fingerprint, _)) = key.origin {
|
||||
if !key.derivation_path.is_master() {
|
||||
self.form_xpub.valid = false;
|
||||
} else if let Some((fingerprint, _)) = key.origin {
|
||||
self.form_xpub.valid = true;
|
||||
if let Some(alias) = self.keys_aliases.get(&fingerprint) {
|
||||
self.form_name.valid = true;
|
||||
|
||||
@ -1304,9 +1304,9 @@ pub fn edit_key_modal<'a>(
|
||||
)
|
||||
})
|
||||
.warning(if network == bitcoin::Network::Bitcoin {
|
||||
"Please enter correct xpub with origin"
|
||||
"Please enter correct xpub with origin and without appended derivation path"
|
||||
} else {
|
||||
"Please enter correct tpub with origin"
|
||||
"Please enter correct tpub with origin and without appended derivation path"
|
||||
})
|
||||
.size(20)
|
||||
.padding(10),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user