File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,9 @@ function p2tr(a, opts) {
139139 } ) ;
140140 lazy . prop ( o , 'signature' , ( ) => {
141141 if ( a . signature ) return a . signature ;
142- if ( ! a . witness || a . witness . length !== 1 ) return ;
143- return a . witness [ 0 ] ;
142+ const witness = _witness ( ) ; // witness without annex
143+ if ( ! witness || witness . length !== 1 ) return ;
144+ return witness [ 0 ] ;
144145 } ) ;
145146 lazy . prop ( o , 'witness' , ( ) => {
146147 if ( a . witness ) return a . witness ;
Original file line number Diff line number Diff line change @@ -149,8 +149,9 @@ export function p2tr(a: Payment, opts?: PaymentOpts): Payment {
149149 } ) ;
150150 lazy . prop ( o , 'signature' , ( ) => {
151151 if ( a . signature ) return a . signature ;
152- if ( ! a . witness || a . witness . length !== 1 ) return ;
153- return a . witness [ 0 ] ;
152+ const witness = _witness ( ) ; // witness without annex
153+ if ( ! witness || witness . length !== 1 ) return ;
154+ return witness [ 0 ] ;
154155 } ) ;
155156
156157 lazy . prop ( o , 'witness' , ( ) => {
You can’t perform that action at this time.
0 commit comments