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

pull/5127/head
pawellula 4 years ago committed by Aniket
parent 2fe1dcd83b
commit 871c02a026
  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