diff --git a/package.json b/package.json index 9fbdc1c..c29ccad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "merkletreejs", - "version": "0.2.14", + "version": "0.2.15", "description": "Construct Merkle Trees and verify proofs", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/MerkleTree.ts b/src/MerkleTree.ts index 1753ad8..00be854 100644 --- a/src/MerkleTree.ts +++ b/src/MerkleTree.ts @@ -1077,14 +1077,14 @@ export class MerkleTree { *``` */ private _bufferifyFn (f: any):any { - return function (value: any) { + return (value: any) => { const v = f(value) if (Buffer.isBuffer(v)) { return v } if (this._isHexString(v)) { - return Buffer.from(v, 'hex') + return Buffer.from(v.replace('0x', ''), 'hex') } // crypto-js support