File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -105,12 +105,11 @@ impl WpkhHotSigner {
105105 let fingerprint = xpriv. fingerprint ( & secp) ;
106106
107107 let deriv_path_str = format ! ( "m{}" , deriv_path( network) ) ;
108+ let d_path = DerivationPath :: from_str ( & deriv_path_str) . expect ( "hardcoded" ) ;
109+ let xprv = xpriv. derive_priv ( & secp, & d_path) . expect ( "cannot fail" ) ;
108110 let secret_key = DescriptorMultiXKey {
109- origin : Some ( (
110- fingerprint,
111- DerivationPath :: from_str ( & deriv_path_str) . expect ( "hardcoded" ) ,
112- ) ) ,
113- xkey : xpriv,
111+ origin : Some ( ( fingerprint, d_path. clone ( ) ) ) ,
112+ xkey : xprv,
114113 derivation_paths : DerivPaths :: new ( vec ! [
115114 vec![ ChildNumber :: from_normal_idx( 0 ) . expect( "hardcoded" ) ] . into( ) ,
116115 vec![ ChildNumber :: from_normal_idx( 1 ) . expect( "hardcoded" ) ] . into( ) ,
@@ -120,8 +119,8 @@ impl WpkhHotSigner {
120119 } ;
121120
122121 WpkhHotSigner {
123- key : xpriv . to_priv ( ) ,
124- master_xpriv : xpriv ,
122+ key : xprv . to_priv ( ) ,
123+ master_xpriv : xprv ,
125124 fingerprint,
126125 secp,
127126 mnemonic : None ,
You can’t perform that action at this time.
0 commit comments