aboutsummaryrefslogtreecommitdiffstats
path: root/test/token_wrapper_test.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-02 22:38:17 +0800
committerFabio Berger <me@fabioberger.com>2017-06-02 22:38:17 +0800
commit3de655954743db4e2b9d02f5ac1243855b909236 (patch)
tree154a218b4f94da6d3cf9fe204e1ecbfd39c7c7b3 /test/token_wrapper_test.ts
parent53af22a844b5666399c83abfb934ad544a27576f (diff)
downloaddexon-sol-tools-3de655954743db4e2b9d02f5ac1243855b909236.tar
dexon-sol-tools-3de655954743db4e2b9d02f5ac1243855b909236.tar.gz
dexon-sol-tools-3de655954743db4e2b9d02f5ac1243855b909236.tar.bz2
dexon-sol-tools-3de655954743db4e2b9d02f5ac1243855b909236.tar.lz
dexon-sol-tools-3de655954743db4e2b9d02f5ac1243855b909236.tar.xz
dexon-sol-tools-3de655954743db4e2b9d02f5ac1243855b909236.tar.zst
dexon-sol-tools-3de655954743db4e2b9d02f5ac1243855b909236.zip
remove unneeded calls to toBaseUnitAmount
Diffstat (limited to 'test/token_wrapper_test.ts')
-rw-r--r--test/token_wrapper_test.ts12
1 files changed, 4 insertions, 8 deletions
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);