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 {
152
152
}
153
153
clone ( ) {
154
154
// TODO: more efficient cloning
155
- const res = Psbt . fromBuffer ( this . data . toBuffer ( ) ) ;
155
+ const res = this . constructor . fromBuffer ( this . data . toBuffer ( ) , this . opts ) ;
156
156
res . opts = JSON . parse ( JSON . stringify ( this . opts ) ) ;
157
157
return res ;
158
158
}
Original file line number Diff line number Diff line change @@ -216,7 +216,10 @@ export class Psbt {
216
216
217
217
clone ( ) : Psbt {
218
218
// 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
+ ) ;
220
223
res . opts = JSON . parse ( JSON . stringify ( this . opts ) ) ;
221
224
return res ;
222
225
}
You can’t perform that action at this time.
0 commit comments