unknown token lookup generates new metadata format
This commit is contained in:
@@ -65,11 +65,12 @@ export async function addExtraToken(chainId, addr) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const token = new ethers.Contract(addr, erc20Abi, s.provider)
|
const token = new ethers.Contract(addr, erc20Abi, s.provider)
|
||||||
Promise.all( [token.symbol(), token.decimals()] ).then((symbol,decimals)=>{
|
Promise.all( [token.name(), token.symbol(), token.decimals()] ).then((name,symbol,decimals)=>{
|
||||||
info = {
|
info = {
|
||||||
address: addr,
|
a: addr,
|
||||||
symbol: symbol,
|
n: name,
|
||||||
decimals: decimals,
|
s: symbol,
|
||||||
|
d: decimals,
|
||||||
}
|
}
|
||||||
s.addToken(chainId, info)
|
s.addToken(chainId, info)
|
||||||
resolve(info)
|
resolve(info)
|
||||||
|
|||||||
Reference in New Issue
Block a user