This commit is contained in:
Tim Olson
2023-12-20 00:55:53 -04:00
parent 8007f63469
commit 9bb3a76b65
6 changed files with 93 additions and 79 deletions

View File

@@ -6,12 +6,14 @@ import {ethers} from "ethers";
// synchronous version may return null but will trigger a lookup
export function token(addr) {
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
}