Fix typo. Add Typescript types

This commit is contained in:
Mati Dastugue 2020-06-13 15:50:15 -03:00
parent 552611d779
commit b5f73c8e3c
2 changed files with 7 additions and 6 deletions

View File

@ -34,7 +34,6 @@ const createERC721TokenContract = async () => {
const web3 = getWeb3()
const erc721Token = await contract(ERC721)
erc721Token.setProvider(web3.currentProvider)
return erc721Token
}

View File

@ -51,11 +51,13 @@ export const isSendERC721Transaction = (tx: any, txCode: string, knownTokens: an
)
}
export const getERC721Symbol = memoize(async (contractAddress) => {
const ERC21token = await getERC721TokenContract()
const tokenInstance = await ERC21token.at(contractAddress)
export const getERC721Symbol = memoize(
async (contractAddress: string): Promise<string> => {
const ERC721token = await getERC721TokenContract()
const tokenInstance = await ERC721token.at(contractAddress)
return tokenInstance.symbol()
})
},
)
export const getERC20DecimalsAndSymbol = async (
tokenAddress: string,