order page updates

This commit is contained in:
Tim
2024-03-27 22:05:56 -04:00
parent 6a01e5bab8
commit 9e884f57ac
7 changed files with 63 additions and 23 deletions

View File

@@ -7,7 +7,12 @@ import {metadata, metadataMap} from "@/version.js";
// synchronous version may return null but will trigger a lookup
export function token(chainId, addr) {
const found = metadataMap[chainId][addr]
const chainMd = metadataMap[chainId];
if (chainMd===undefined) {
console.warn('no metadata for chain', chainId)
return null
}
const found = chainMd[addr]
return found ? found : null
}