Enforce that info.id field matches exactly folder name (i.e. in checksum format) (#6077)

Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
This commit is contained in:
Adam R 2021-03-25 14:28:56 +01:00 committed by GitHub
parent 02decb1b9e
commit 87750b5f9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ function isAssetInfoValid(info: unknown, path: string, address: string, chain: s
return [`Incorrect value for id '${info['id']}' '${chain}' ${path}`, "", fixedInfo];
}
// is is correct value, but casing is wrong
return ["", `Wrong casing for id '${info['id']}' '${chain}' ${path}`, fixedInfo];
return [`Wrong casing for id '${info['id']}' '${chain}' ${path}`, "", fixedInfo];
}
// fix
if (!fixedInfo) { fixedInfo = info; }