Skip to content

Commit 708fe38

Browse files
authored
Merge pull request #1891 from fboucquez/fboucquez/fix/android-buffer.alloc
fix: android `TypedArray.of requires its this argument to subclass a TypedArray constructor`
2 parents a59eecd + 3541220 commit 708fe38

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/transaction.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class Transaction {
389389
// https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_note-19
390390
return bcrypto.taggedHash(
391391
'TapSighash',
392-
Buffer.concat([Buffer.of(0x00), sigMsgWriter.end()]),
392+
Buffer.concat([Buffer.from([0x00]), sigMsgWriter.end()]),
393393
);
394394
}
395395
hashForWitnessV0(inIndex, prevOutScript, value, hashType) {

ts_src/transaction.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ export class Transaction {
490490
// https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_note-19
491491
return bcrypto.taggedHash(
492492
'TapSighash',
493-
Buffer.concat([Buffer.of(0x00), sigMsgWriter.end()]),
493+
Buffer.concat([Buffer.from([0x00]), sigMsgWriter.end()]),
494494
);
495495
}
496496

0 commit comments

Comments
 (0)