fix comparinf bytecode

pull/5370/head
yann300 2 years ago committed by Aniket
parent d716b9ed6a
commit 4e27d577e2
  1. 6
      libs/remix-lib/src/util.ts
  2. 8
      libs/remix-lib/test/util.ts

@ -258,6 +258,12 @@ export function compareByteCode (code1, code2) {
code2 = extractcborMetadata(code2)
if (code1 && code2) {
if (code1.length !== code2.length) {
// if the length isn't the same, we have an issue with extracting the metadata hash.
const minLength = code1.length > code2.length ? code2.length: code1.length
code1 = code1.substr(0, minLength - 10)
code2 = code2.substr(0, minLength - 10)
}
const compare = stringSimilarity.compareTwoStrings(code1, code2)
return compare == 1
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save