feat: manually fix linting errors across tests
This commit is contained in:
@ -2,7 +2,7 @@ import utils from 'ethereumjs-util';
|
||||
|
||||
// Hash and add same prefix to the hash that testrpc use.
|
||||
module.exports = function (message) {
|
||||
const messageHex = new Buffer(utils.sha3(message).toString('hex'), 'hex');
|
||||
const messageHex = Buffer.from(utils.sha3(message).toString('hex'), 'hex');
|
||||
const prefix = utils.toBuffer('\u0019Ethereum Signed Message:\n' + messageHex.length.toString());
|
||||
return utils.bufferToHex(utils.sha3(Buffer.concat([prefix, messageHex])));
|
||||
};
|
||||
|
||||
@ -15,7 +15,7 @@ export default class MerkleTree {
|
||||
}
|
||||
|
||||
getLayers (elements) {
|
||||
if (elements.length == 0) {
|
||||
if (elements.length === 0) {
|
||||
return [['']];
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
export default func =>
|
||||
(...args) =>
|
||||
new Promise((accept, reject) =>
|
||||
func(...args, (error, data) => error ? reject(error) : accept(data)));
|
||||
new Promise((resolve, reject) =>
|
||||
func(...args, (error, data) => error ? reject(error) : resolve(data)));
|
||||
|
||||
Reference in New Issue
Block a user