Skip to content

Commit

Permalink
Merge pull request #293 from jet86/patch-1
Browse files Browse the repository at this point in the history
Replace toBuffer() with toArrayLike(Buffer)
  • Loading branch information
nicholasmueller authored May 21, 2020
2 parents 05530e2 + 434ecec commit e452640
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/omg-js-util/src/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function addInput (array, input) {
if (input.blknum !== 0) {
const blk = numberToBN(input.blknum).mul(BLOCK_OFFSET)
const tx = numberToBN(input.txindex).muln(TX_OFFSET)
const position = blk.add(tx).addn(input.oindex).toBuffer()
const position = blk.add(tx).addn(input.oindex).toArrayLike(Buffer)
const toPad = 32 - position.length
const pads = Buffer.alloc(toPad, 0)
const encodedPosition = Buffer.concat([pads, position])
Expand Down

0 comments on commit e452640

Please sign in to comment.