Adjust token type / chain check; case insensitive (#5537)

Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
This commit is contained in:
Adam R 2021-02-09 23:43:12 +01:00 committed by GitHub
parent c3cefe9310
commit c41a67d7f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ function isAssetInfoValid(info: unknown, path: string, address: string, chain: s
}
export function chainFromAssetType(type: string): string {
switch (type) {
switch (type.toUpperCase()) {
case "ERC20": return "ethereum";
case "BEP2": return "binance";
case "BEP20": return "smartchain";
@ -79,7 +79,7 @@ export function chainFromAssetType(type: string): string {
case "NEP5": return "neo";
case "NRC20": return "nuls";
case "VET": return "vechain";
case "ontology": return "ontology";
case "ONTOLOGY": return "ontology";
}
}