pull/7/head
yann300 8 years ago
parent 9f8ef39670
commit ed9a95dfa8
  1. 2
      src/helpers/util.js

@ -133,7 +133,7 @@ module.exports = {
* @return {Object} - return sha3ied value * @return {Object} - return sha3ied value
*/ */
sha3_256: function (value) { sha3_256: function (value) {
if (typeof value === 'string' && !value.startsWith('0x')) { if (typeof value === 'string' && value.indexOf('0x') !== 0) {
value = '0x' + value value = '0x' + value
} }
var ret = ethutil.bufferToHex(ethutil.setLengthLeft(value, 32)) var ret = ethutil.bufferToHex(ethutil.setLengthLeft(value, 32))

Loading…
Cancel
Save