aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-02 22:36:25 +0800
committerFabio Berger <me@fabioberger.com>2017-06-02 22:36:25 +0800
commit53af22a844b5666399c83abfb934ad544a27576f (patch)
tree699e07e8c18269501750f4e78025f73d63b3af93
parent563d0ca4a2e278a472c3c40db2ce914df9d83a82 (diff)
downloaddexon-0x-contracts-53af22a844b5666399c83abfb934ad544a27576f.tar.gz
dexon-0x-contracts-53af22a844b5666399c83abfb934ad544a27576f.tar.zst
dexon-0x-contracts-53af22a844b5666399c83abfb934ad544a27576f.zip
pass numbers to BigNumber unless it's too big for the number type
-rw-r--r--test/token_wrapper_test.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/token_wrapper_test.ts b/test/token_wrapper_test.ts
index b020caa5b..12ae8655c 100644
--- a/test/token_wrapper_test.ts
+++ b/test/token_wrapper_test.ts
@@ -161,7 +161,7 @@ describe('TokenWrapper', () => {
const expectedAllowanceBeforeAllowanceSet = new BigNumber(0);
expect(allowanceBeforeSet).to.be.bignumber.equal(expectedAllowanceBeforeAllowanceSet);
- const amountInUnits = new BigNumber('50');
+ const amountInUnits = new BigNumber(50);
const amountInBaseUnits = ZeroEx.toBaseUnitAmount(amountInUnits, token.decimals);
await zeroEx.token.setAllowanceAsync(token.address, ownerAddress, spenderAddress, amountInBaseUnits);
@@ -176,7 +176,7 @@ describe('TokenWrapper', () => {
const ownerAddress = coinbase;
const spenderAddress = addressWithoutFunds;
- const amountInUnits = new BigNumber('50');
+ const amountInUnits = new BigNumber(50);
const amountInBaseUnits = ZeroEx.toBaseUnitAmount(amountInUnits, token.decimals);
await zeroEx.token.setAllowanceAsync(token.address, ownerAddress, spenderAddress, amountInBaseUnits);
@@ -198,7 +198,7 @@ describe('TokenWrapper', () => {
const token = tokens[0];
const ownerAddress = coinbase;
- const amountInUnits = new BigNumber('50');
+ const amountInUnits = new BigNumber(50);
const amountInBaseUnits = ZeroEx.toBaseUnitAmount(amountInUnits, token.decimals);
await zeroEx.token.setProxyAllowanceAsync(token.address, ownerAddress, amountInBaseUnits);
@@ -216,7 +216,7 @@ describe('TokenWrapper', () => {
const expectedAllowanceBeforeAllowanceSet = new BigNumber(0);
expect(allowanceBeforeSet).to.be.bignumber.equal(expectedAllowanceBeforeAllowanceSet);
- const amountInUnits = new BigNumber('50');
+ const amountInUnits = new BigNumber(50);
const amountInBaseUnits = ZeroEx.toBaseUnitAmount(amountInUnits, token.decimals);
await zeroEx.token.setProxyAllowanceAsync(token.address, ownerAddress, amountInBaseUnits);