Fix typo. Add Typescript types
This commit is contained in:
parent
552611d779
commit
b5f73c8e3c
|
@ -34,7 +34,6 @@ const createERC721TokenContract = async () => {
|
||||||
const web3 = getWeb3()
|
const web3 = getWeb3()
|
||||||
const erc721Token = await contract(ERC721)
|
const erc721Token = await contract(ERC721)
|
||||||
erc721Token.setProvider(web3.currentProvider)
|
erc721Token.setProvider(web3.currentProvider)
|
||||||
|
|
||||||
return erc721Token
|
return erc721Token
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,11 +51,13 @@ export const isSendERC721Transaction = (tx: any, txCode: string, knownTokens: an
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getERC721Symbol = memoize(async (contractAddress) => {
|
export const getERC721Symbol = memoize(
|
||||||
const ERC21token = await getERC721TokenContract()
|
async (contractAddress: string): Promise<string> => {
|
||||||
const tokenInstance = await ERC21token.at(contractAddress)
|
const ERC721token = await getERC721TokenContract()
|
||||||
return tokenInstance.symbol()
|
const tokenInstance = await ERC721token.at(contractAddress)
|
||||||
})
|
return tokenInstance.symbol()
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
export const getERC20DecimalsAndSymbol = async (
|
export const getERC20DecimalsAndSymbol = async (
|
||||||
tokenAddress: string,
|
tokenAddress: string,
|
||||||
|
|
Loading…
Reference in New Issue