diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-04-13 09:06:45 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:17 +0800 |
commit | 8374a51e6aed171c64600205b1219c6f38550a06 (patch) | |
tree | 2d2759ce586f80fb8a79d590e092dd20709e21e4 /packages/contracts/test/exchange/core.ts | |
parent | 4e48de111600412c6344bc5c4df42e4d17807e97 (diff) | |
download | dexon-sol-tools-8374a51e6aed171c64600205b1219c6f38550a06.tar dexon-sol-tools-8374a51e6aed171c64600205b1219c6f38550a06.tar.gz dexon-sol-tools-8374a51e6aed171c64600205b1219c6f38550a06.tar.bz2 dexon-sol-tools-8374a51e6aed171c64600205b1219c6f38550a06.tar.lz dexon-sol-tools-8374a51e6aed171c64600205b1219c6f38550a06.tar.xz dexon-sol-tools-8374a51e6aed171c64600205b1219c6f38550a06.tar.zst dexon-sol-tools-8374a51e6aed171c64600205b1219c6f38550a06.zip |
Replaced instances of `accounts[0]` with `owner` in contracts test cases
Diffstat (limited to 'packages/contracts/test/exchange/core.ts')
-rw-r--r-- | packages/contracts/test/exchange/core.ts | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index 2c12f35b7..9f8fc5189 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -74,6 +74,7 @@ describe('Exchange', () => { const accounts = await web3Wrapper.getAvailableAddressesAsync(); makerAddress = accounts[0]; [tokenOwner, takerAddress, feeRecipientAddress] = accounts; + const owner = tokenOwner; const [repInstance, dgdInstance, zrxInstance, ckInstance] = await Promise.all([ deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), @@ -109,16 +110,16 @@ describe('Exchange', () => { provider, ); await erc20TransferProxyV1.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, { - from: accounts[0], + from: owner, }); await tokenTransferProxy.addAuthorizedAddress.sendTransactionAsync(erc20TransferProxyV1.address, { - from: accounts[0], + from: owner, }); await assetProxyDispatcher.addAssetProxy.sendTransactionAsync( AssetProxyId.ERC20V1, erc20TransferProxyV1.address, ZeroEx.NULL_ADDRESS, - { from: accounts[0] }, + { from: owner }, ); // Deploy ERC20 Proxy const erc20TransferProxyInstance = await deployer.deployAsync(ContractName.ERC20Proxy); @@ -128,13 +129,13 @@ describe('Exchange', () => { provider, ); await erc20TransferProxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, { - from: accounts[0], + from: owner, }); await assetProxyDispatcher.addAssetProxy.sendTransactionAsync( AssetProxyId.ERC20, erc20TransferProxy.address, ZeroEx.NULL_ADDRESS, - { from: accounts[0] }, + { from: owner }, ); // Deploy ERC721 Proxy const erc721TransferProxyInstance = await deployer.deployAsync(ContractName.ERC721Proxy); @@ -144,13 +145,13 @@ describe('Exchange', () => { provider, ); await erc721TransferProxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, { - from: accounts[0], + from: owner, }); await assetProxyDispatcher.addAssetProxy.sendTransactionAsync( AssetProxyId.ERC721, erc721TransferProxy.address, ZeroEx.NULL_ADDRESS, - { from: accounts[0] }, + { from: owner }, ); // Deploy and configure Exchange const exchangeInstance = await deployer.deployAsync(ContractName.Exchange, [ @@ -159,7 +160,7 @@ describe('Exchange', () => { assetProxyDispatcher.address, ]); exchange = new ExchangeContract(exchangeInstance.abi, exchangeInstance.address, provider); - await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: accounts[0] }); + await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: owner }); zeroEx = new ZeroEx(provider, { exchangeContractAddress: exchange.address, networkId: constants.TESTRPC_NETWORK_ID, |