order building fixes

This commit is contained in:
Tim
2024-03-27 16:11:12 -04:00
parent fb82f23d88
commit 204c63f1b9
3 changed files with 10 additions and 20 deletions

View File

@@ -6,21 +6,9 @@ import {metadata, metadataMap} from "@/version.js";
// synchronous version may return null but will trigger a lookup
export function token(addr) {
// todo deprecated. use metadataMap[chainId][addr]
console.warn('token() is deprecated')
console.log('token', addr)
if( !addr ) {
// console.log('ignoring call to token', addr)
return null
}
const s = useStore()
if( !(addr in s.tokens) ) {
// noinspection JSIgnoredPromiseFromCall
getToken(addr)
return null
}
return s.tokens[addr]
export function token(chainId, addr) {
const found = metadataMap[chainId][addr]
return found ? found : null
}