File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ impl WrapPsbt {
2727 pub fn update_input_with_descriptor (
2828 & mut self ,
2929 input_index : usize ,
30- descriptor : WrapDescriptor ,
30+ descriptor : & WrapDescriptor ,
3131 ) -> Result < ( ) , JsError > {
32- match descriptor. 0 {
32+ match & descriptor. 0 {
3333 WrapDescriptorEnum :: Definite ( d) => self
3434 . 0
3535 . update_input_with_descriptor ( input_index, & d)
@@ -47,9 +47,9 @@ impl WrapPsbt {
4747 pub fn update_output_with_descriptor (
4848 & mut self ,
4949 output_index : usize ,
50- descriptor : WrapDescriptor ,
50+ descriptor : & WrapDescriptor ,
5151 ) -> Result < ( ) , JsError > {
52- match descriptor. 0 {
52+ match & descriptor. 0 {
5353 WrapDescriptorEnum :: Definite ( d) => self
5454 . 0
5555 . update_output_with_descriptor ( output_index, & d)
Original file line number Diff line number Diff line change @@ -43,8 +43,9 @@ function describeUpdateInputWithDescriptor(
4343 describe ( "Wrapped PSBT updateInputWithDescriptor" , function ( ) {
4444 it ( "should update the input with the descriptor" , function ( ) {
4545 const wrappedPsbt = toWrappedPsbt ( psbt ) ;
46- wrappedPsbt . updateInputWithDescriptor ( 0 , descriptor . atDerivationIndex ( index ) ) ;
47- wrappedPsbt . updateOutputWithDescriptor ( 0 , descriptor . atDerivationIndex ( index ) ) ;
46+ const descriptorAtDerivation = descriptor . atDerivationIndex ( index ) ;
47+ wrappedPsbt . updateInputWithDescriptor ( 0 , descriptorAtDerivation ) ;
48+ wrappedPsbt . updateOutputWithDescriptor ( 0 , descriptorAtDerivation ) ;
4849 const updatedPsbt = toUtxoPsbt ( wrappedPsbt ) ;
4950 assertEqualPsbt ( updatedPsbt , getFixtureAtStage ( "unsigned" ) . psbt ) ;
5051 updatedPsbt . signAllInputsHD ( rootWalletKeys . triple [ 0 ] ) ;
You can’t perform that action at this time.
0 commit comments