diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-12-16 02:03:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-16 02:03:01 +0800 |
commit | 3eb08735d4d0fe4b046dd6b74f5ed503cf5c64e3 (patch) | |
tree | 38a2de1b15985590b879f71fc17cbee35a17ba78 /packages/contracts/test | |
parent | de8c445f961e1a09bed6a01397e36b96e0ea3d9a (diff) | |
parent | c8e52882ca556ea06696a56e312f69284f99aa29 (diff) | |
download | dexon-sol-tools-3eb08735d4d0fe4b046dd6b74f5ed503cf5c64e3.tar dexon-sol-tools-3eb08735d4d0fe4b046dd6b74f5ed503cf5c64e3.tar.gz dexon-sol-tools-3eb08735d4d0fe4b046dd6b74f5ed503cf5c64e3.tar.bz2 dexon-sol-tools-3eb08735d4d0fe4b046dd6b74f5ed503cf5c64e3.tar.lz dexon-sol-tools-3eb08735d4d0fe4b046dd6b74f5ed503cf5c64e3.tar.xz dexon-sol-tools-3eb08735d4d0fe4b046dd6b74f5ed503cf5c64e3.tar.zst dexon-sol-tools-3eb08735d4d0fe4b046dd6b74f5ed503cf5c64e3.zip |
Merge pull request #266 from 0xProject/fix/no-unused-vars
Remove all unused vars and imports
Diffstat (limited to 'packages/contracts/test')
-rw-r--r-- | packages/contracts/test/ts/ether_token_v2.ts | 5 | ||||
-rw-r--r-- | packages/contracts/test/ts/exchange/core.ts | 1 | ||||
-rw-r--r-- | packages/contracts/test/ts/exchange/wrapper.ts | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/packages/contracts/test/ts/ether_token_v2.ts b/packages/contracts/test/ts/ether_token_v2.ts index b88fef579..61ac4cb57 100644 --- a/packages/contracts/test/ts/ether_token_v2.ts +++ b/packages/contracts/test/ts/ether_token_v2.ts @@ -81,7 +81,7 @@ contract('EtherTokenV2', (accounts: string[]) => { const logArgs = (logs[0] as any).args; expect(logArgs._from).to.equal(expectedFrom); expect(logArgs._to).to.equal(expectedTo); - expect(logArgs._value).to.be.bignumber.equal(ethToDeposit); + expect(logArgs._value).to.be.bignumber.equal(expectedValue); }); }); @@ -120,7 +120,6 @@ contract('EtherTokenV2', (accounts: string[]) => { it('should log 1 event with correct arguments', async () => { const initEthTokenBalance = await zeroEx.token.getBalanceAsync(etherTokenAddress, account); - const initEthBalance = await getEthBalanceAsync(account); const ethTokensToWithdraw = initEthTokenBalance; expect(ethTokensToWithdraw).to.not.be.bignumber.equal(0); const txHash = await zeroEx.etherToken.withdrawAsync(ethTokensToWithdraw, account, { @@ -137,7 +136,7 @@ contract('EtherTokenV2', (accounts: string[]) => { const logArgs = (logs[0] as any).args; expect(logArgs._from).to.equal(expectedFrom); expect(logArgs._to).to.equal(expectedTo); - expect(logArgs._value).to.be.bignumber.equal(ethTokensToWithdraw); + expect(logArgs._value).to.be.bignumber.equal(expectedValue); }); }); diff --git a/packages/contracts/test/ts/exchange/core.ts b/packages/contracts/test/ts/exchange/core.ts index 641084937..aef2b5a5d 100644 --- a/packages/contracts/test/ts/exchange/core.ts +++ b/packages/contracts/test/ts/exchange/core.ts @@ -748,7 +748,6 @@ contract('Exchange', (accounts: string[]) => { const res = await exWrapper.cancelOrderAsync(order, maker); expect(res.logs).to.have.length(1); - const errId = res.logs[0].args.errorId.toNumber(); const errCode = res.logs[0].args.errorId.toNumber(); expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_FULLY_FILLED_OR_CANCELLED); }); diff --git a/packages/contracts/test/ts/exchange/wrapper.ts b/packages/contracts/test/ts/exchange/wrapper.ts index 3097f6887..13a0b6058 100644 --- a/packages/contracts/test/ts/exchange/wrapper.ts +++ b/packages/contracts/test/ts/exchange/wrapper.ts @@ -227,8 +227,6 @@ contract('Exchange', (accounts: string[]) => { it('should throw if a single order does not fill the expected amount', async () => { const fillTakerTokenAmounts: BigNumber[] = []; - const makerToken = rep.address; - const takerToken = dgd.address; orders.forEach(order => { const fillTakerTokenAmount = order.params.takerTokenAmount.div(2); fillTakerTokenAmounts.push(fillTakerTokenAmount); @@ -311,7 +309,7 @@ contract('Exchange', (accounts: string[]) => { const cancelTakerTokenAmounts = _.map(orders, order => order.params.takerTokenAmount); await exWrapper.batchCancelOrdersAsync(orders, maker, {cancelTakerTokenAmounts}); - const res = await exWrapper.batchFillOrdersAsync( + await exWrapper.batchFillOrdersAsync( orders, taker, {fillTakerTokenAmounts: cancelTakerTokenAmounts}); const newBalances = await dmyBalances.getAsync(); expect(balances).to.be.deep.equal(newBalances); |