@@ -27,9 +27,6 @@ WizardComponent {
2727 wizard_data[' multisig_cosigner_data' ][cosigner .toString ()][' master_key' ] = key
2828 } else {
2929 wizard_data[' master_key' ] = key
30- // Pass key-origin fields through to create_storage() so the
31- // keystore is stored with the correct derivation prefix and master
32- // fingerprint. Both fields are optional; empty strings are ignored.
3330 wizard_data[' key_origin_derivation' ] = derivation_tf .text .trim ()
3431 wizard_data[' key_origin_fingerprint' ] = fingerprint_tf .text .trim ().toLowerCase ()
3532 }
@@ -65,12 +62,9 @@ WizardComponent {
6562 return valid = true
6663 }
6764
68- // Validate the key-origin fields and update the inline error label.
69- // Returns true when everything is OK (or when the section is not shown).
7065 function validateKeyOrigin () {
7166 if (cosigner || wizard_data[' wallet_type' ] === ' multisig' )
7267 return true
73- // Section is hidden for depth <= 1: no validation needed.
7468 if (bitcoin .masterKeyDepth (masterkey_ta .text .trim ()) <= 1 )
7569 return true
7670 var msg = bitcoin .verifyKeyOriginInfo (
@@ -82,8 +76,6 @@ WizardComponent {
8276 return msg === ' '
8377 }
8478
85- // Revalidate both the master key and the key-origin fields together,
86- // then commit the current values to wizard_data.
8779 function revalidate () {
8880 var keyOk = verifyMasterKey (masterkey_ta .text )
8981 var originOk = validateKeyOrigin ()
@@ -222,30 +214,8 @@ WizardComponent {
222214 }
223215 }
224216
225- // ── Key-origin section ─────────────────────────────────────────────
226- // Only shown for standard single-sig imports (not multisig/cosigner)
227- // where the key depth is > 1.
228- //
229- // Both fields are optional.
230- //
231- // Hardware wallets export xpubs at derivation depth > 1 (e.g.
232- // Coldcard exports a zpub at m/84'/0'/0', depth=3). Electrum
233- // cannot infer the master fingerprint or the full derivation path
234- // from such an xpub alone, so without these values the generated
235- // PSBTs will be missing key-origin metadata and hardware signers
236- // that verify it will refuse to sign the transaction.
237- //
238- // At depth 0 the node IS the root -> fingerprint is computed locally.
239- // At depth 1 the node encodes the master fingerprint directly in its
240- // parent_fingerprint bytes, so Electrum can infer it automatically.
241- // At depth > 1 the xpub only carries the *immediate parent's*
242- // fingerprint (e.g. Coldcard zpub at m/84'/0'/0' has depth 3), so
243- // Electrum cannot recover the master fingerprint or full path on its
244- // own -> the user must supply them.
245217 ColumnLayout {
246218 id: keyOriginSection
247- // masterKeyDepth returns -1 for invalid/empty input, so the
248- // section stays hidden until a valid key of depth > 1 is entered.
249219 visible: ! cosigner
250220 && wizard_data[' wallet_type' ] !== ' multisig'
251221 && bitcoin .masterKeyDepth (masterkey_ta .text .trim ()) > 1
0 commit comments