fix shortenHexData

pull/1/head
yann300 7 years ago
parent ce85603822
commit 3b45f0954e
  1. 1
      src/lib/helper.js

@ -4,6 +4,7 @@ module.exports = {
return address.slice(0, 5) + '...' + address.slice(len - 5, len) + (etherBalance ? ' (' + etherBalance.toString() + ' ether)' : '') return address.slice(0, 5) + '...' + address.slice(len - 5, len) + (etherBalance ? ' (' + etherBalance.toString() + ' ether)' : '')
}, },
shortenHexData: function (data) { shortenHexData: function (data) {
if (!data) return ''
if (data.length < 5) return data if (data.length < 5) return data
var len = data.length var len = data.length
return data.slice(0, 5) + '...' + data.slice(len - 5, len) return data.slice(0, 5) + '...' + data.slice(len - 5, len)

Loading…
Cancel
Save