File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ class Psbt {
152152 }
153153 clone ( ) {
154154 // TODO: more efficient cloning
155- const res = Psbt . fromBuffer ( this . data . toBuffer ( ) ) ;
155+ const res = this . constructor . fromBuffer ( this . data . toBuffer ( ) , this . opts ) ;
156156 res . opts = JSON . parse ( JSON . stringify ( this . opts ) ) ;
157157 return res ;
158158 }
Original file line number Diff line number Diff line change @@ -216,7 +216,10 @@ export class Psbt {
216216
217217 clone ( ) : Psbt {
218218 // TODO: more efficient cloning
219- const res = Psbt . fromBuffer ( this . data . toBuffer ( ) ) ;
219+ const res = ( this . constructor as typeof Psbt ) . fromBuffer (
220+ this . data . toBuffer ( ) ,
221+ this . opts ,
222+ ) ;
220223 res . opts = JSON . parse ( JSON . stringify ( this . opts ) ) ;
221224 return res ;
222225 }
You can’t perform that action at this time.
0 commit comments