Fixed deprecated buffer creation

This commit is contained in:
Richard Ramos 2018-11-26 08:56:14 -04:00 committed by GitHub
parent 2710d7bfc9
commit 6f7a153ce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ for(i = 0; i < numCodes; i++){
const code = crypto.randomBytes(codeLength).toString('hex'); const code = crypto.randomBytes(codeLength).toString('hex');
codes.push(code); codes.push(code);
elements.push(sha3(new Buffer(code, 'hex'))); elements.push(sha3(Buffer.from(code, 'hex')));
} }
const merkleTree = new MerkleTree.default(elements); const merkleTree = new MerkleTree.default(elements);