Do not shorten hex data when it's exactly the same length

pull/5370/head
pawellula 4 years ago committed by Aniket
parent 5322d240b5
commit 03f39c2d2b
  1. 5
      apps/remix-ide/src/lib/helper.js

@ -18,9 +18,10 @@ export default {
},
shortenHexData: function (data) {
if (!data) return ''
if (data.length < 5) return data
var sliceLen = 5
var len = data.length
return data.slice(0, 5) + '...' + data.slice(len - 5, len)
if (len < sliceLen * 2) return data
return data.slice(0, sliceLen) + '...' + data.slice(len - sliceLen, len)
},
createNonClashingNameWithPrefix (name, fileProvider, prefix, cb) {
if (!name) name = 'Undefined'

Loading…
Cancel
Save