diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-07-27 07:30:44 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-08-17 08:31:21 +0800 |
commit | 2743eee044edfd3dafc012e31f60ecf4ee0ce30f (patch) | |
tree | af74979a35ab819b6466dacf1881793ebb794915 /packages | |
parent | bb3c34589130c6453f4a7ec5a96c75f729b24a67 (diff) | |
download | dexon-sol-tools-2743eee044edfd3dafc012e31f60ecf4ee0ce30f.tar dexon-sol-tools-2743eee044edfd3dafc012e31f60ecf4ee0ce30f.tar.gz dexon-sol-tools-2743eee044edfd3dafc012e31f60ecf4ee0ce30f.tar.bz2 dexon-sol-tools-2743eee044edfd3dafc012e31f60ecf4ee0ce30f.tar.lz dexon-sol-tools-2743eee044edfd3dafc012e31f60ecf4ee0ce30f.tar.xz dexon-sol-tools-2743eee044edfd3dafc012e31f60ecf4ee0ce30f.tar.zst dexon-sol-tools-2743eee044edfd3dafc012e31f60ecf4ee0ce30f.zip |
Update checking for erc721 existence
Diffstat (limited to 'packages')
-rw-r--r-- | packages/contracts/test/utils/erc721_wrapper.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/contracts/test/utils/erc721_wrapper.ts b/packages/contracts/test/utils/erc721_wrapper.ts index d023b4d02..0c12130a3 100644 --- a/packages/contracts/test/utils/erc721_wrapper.ts +++ b/packages/contracts/test/utils/erc721_wrapper.ts @@ -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> { |