From ed9a95dfa8de53253d1ab6f90f8381ceae3e120c Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 21 Apr 2017 17:26:50 +0200 Subject: [PATCH] fix test --- src/helpers/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/util.js b/src/helpers/util.js index 1d1d3655da..8c6aa39ffd 100644 --- a/src/helpers/util.js +++ b/src/helpers/util.js @@ -133,7 +133,7 @@ module.exports = { * @return {Object} - return sha3ied value */ sha3_256: function (value) { - if (typeof value === 'string' && !value.startsWith('0x')) { + if (typeof value === 'string' && value.indexOf('0x') !== 0) { value = '0x' + value } var ret = ethutil.bufferToHex(ethutil.setLengthLeft(value, 32))