From 3de655954743db4e2b9d02f5ac1243855b909236 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 2 Jun 2017 16:38:17 +0200 Subject: remove unneeded calls to toBaseUnitAmount --- test/token_wrapper_test.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'test/token_wrapper_test.ts') diff --git a/test/token_wrapper_test.ts b/test/token_wrapper_test.ts index 12ae8655c..d4f36459a 100644 --- a/test/token_wrapper_test.ts +++ b/test/token_wrapper_test.ts @@ -161,8 +161,7 @@ describe('TokenWrapper', () => { const expectedAllowanceBeforeAllowanceSet = new BigNumber(0); expect(allowanceBeforeSet).to.be.bignumber.equal(expectedAllowanceBeforeAllowanceSet); - const amountInUnits = new BigNumber(50); - const amountInBaseUnits = ZeroEx.toBaseUnitAmount(amountInUnits, token.decimals); + const amountInBaseUnits = new BigNumber(50); await zeroEx.token.setAllowanceAsync(token.address, ownerAddress, spenderAddress, amountInBaseUnits); const allowanceAfterSet = await zeroEx.token.getAllowanceAsync(token.address, ownerAddress, spenderAddress); @@ -176,8 +175,7 @@ describe('TokenWrapper', () => { const ownerAddress = coinbase; const spenderAddress = addressWithoutFunds; - const amountInUnits = new BigNumber(50); - const amountInBaseUnits = ZeroEx.toBaseUnitAmount(amountInUnits, token.decimals); + const amountInBaseUnits = new BigNumber(50); await zeroEx.token.setAllowanceAsync(token.address, ownerAddress, spenderAddress, amountInBaseUnits); const allowance = await zeroEx.token.getAllowanceAsync(token.address, ownerAddress, spenderAddress); @@ -198,8 +196,7 @@ describe('TokenWrapper', () => { const token = tokens[0]; const ownerAddress = coinbase; - const amountInUnits = new BigNumber(50); - const amountInBaseUnits = ZeroEx.toBaseUnitAmount(amountInUnits, token.decimals); + const amountInBaseUnits = new BigNumber(50); await zeroEx.token.setProxyAllowanceAsync(token.address, ownerAddress, amountInBaseUnits); const allowance = await zeroEx.token.getProxyAllowanceAsync(token.address, ownerAddress); @@ -216,8 +213,7 @@ describe('TokenWrapper', () => { const expectedAllowanceBeforeAllowanceSet = new BigNumber(0); expect(allowanceBeforeSet).to.be.bignumber.equal(expectedAllowanceBeforeAllowanceSet); - const amountInUnits = new BigNumber(50); - const amountInBaseUnits = ZeroEx.toBaseUnitAmount(amountInUnits, token.decimals); + const amountInBaseUnits = new BigNumber(50); await zeroEx.token.setProxyAllowanceAsync(token.address, ownerAddress, amountInBaseUnits); const allowanceAfterSet = await zeroEx.token.getProxyAllowanceAsync(token.address, ownerAddress); -- cgit