Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Commit

Permalink
Fix type mismatch error
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanio committed May 14, 2020
1 parent 2edd2de commit a2c66e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const stripZeros = function(a: any): Buffer | number[] | string {
export const toBuffer = function(v: any): Buffer {
if (!Buffer.isBuffer(v)) {
if (Array.isArray(v) || v instanceof Uint8Array) {
v = Buffer.from(v)
v = Buffer.from(v as any)
} else if (typeof v === 'string') {
if (ethjsUtil.isHexString(v)) {
v = Buffer.from(ethjsUtil.padToEven(ethjsUtil.stripHexPrefix(v)), 'hex')
Expand Down

0 comments on commit a2c66e1

Please sign in to comment.