Update checking for erc721 existence

This commit is contained in:
Amir Bandeali
2018-07-26 16:30:44 -07:00
parent bb3c345891
commit 2743eee044

View File

@@ -35,8 +35,6 @@ export class ERC721Wrapper {
artifacts.DummyERC721Token,
this._provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
),
);
}
@@ -81,7 +79,8 @@ export class ERC721Wrapper {
}
public async doesTokenExistAsync(tokenAddress: string, tokenId: BigNumber): Promise<boolean> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const doesExist = await tokenContract.exists.callAsync(tokenId);
const owner = await tokenContract.ownerOf.callAsync(tokenId);
const doesExist = owner !== constants.NULL_ADDRESS;
return doesExist;
}
public async approveProxyAsync(tokenAddress: string, tokenId: BigNumber): Promise<void> {