Skip to content

Commit 22d5831

Browse files
committed
Remove Output casts from Transaction class
1 parent 2aa3926 commit 22d5831

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ts_src/transaction.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ export class Transaction {
268268
newTx.outs = this.outs.map(txOut => {
269269
return {
270270
script: txOut.script,
271-
value: (txOut as Output).value,
271+
value: txOut.value,
272272
};
273273
});
274274

@@ -438,7 +438,7 @@ export class Transaction {
438438
toffset = 0;
439439

440440
this.outs.forEach(out => {
441-
writeUInt64((out as Output).value);
441+
writeUInt64(out.value);
442442
writeVarSlice(out.script);
443443
});
444444

@@ -451,7 +451,7 @@ export class Transaction {
451451

452452
tbuffer = Buffer.allocUnsafe(8 + varSliceSize(output.script));
453453
toffset = 0;
454-
writeUInt64((output as Output).value);
454+
writeUInt64(output.value);
455455
writeVarSlice(output.script);
456456

457457
hashOutputs = bcrypto.hash256(tbuffer);

0 commit comments

Comments
 (0)