aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-01 23:23:03 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-01 23:29:13 +0800
commitab5d99954946e01bdede26c4157fcfbdf9ae8bb1 (patch)
treea31ad8d0330b9c3d467ffeeb031368a86f60502a /test
parent1e8eb054bc99baf9d10cafe9d5d388857484a801 (diff)
downloaddexon-0x-contracts-ab5d99954946e01bdede26c4157fcfbdf9ae8bb1.tar.gz
dexon-0x-contracts-ab5d99954946e01bdede26c4157fcfbdf9ae8bb1.tar.zst
dexon-0x-contracts-ab5d99954946e01bdede26c4157fcfbdf9ae8bb1.zip
Remove duplicate declarations
Diffstat (limited to 'test')
-rw-r--r--test/exchange_wrapper_test.ts18
1 files changed, 3 insertions, 15 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index cb7482c99..091d23fca 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -110,18 +110,6 @@ describe('ExchangeWrapper', () => {
let networkId: number;
const addressBySymbol: {[symbol: string]: string} = {};
const shouldCheckTransfer = false;
- const setBalanceAsync = async (toAddress: string,
- amountInBaseUnits: BigNumber.BigNumber|number,
- tokenAddress: string) => {
- const amount = _.isNumber(amountInBaseUnits) ? new BigNumber(amountInBaseUnits) : amountInBaseUnits;
- await zeroEx.token.transferAsync(tokenAddress, userAddresses[0], toAddress, amount);
- };
- const setAllowanceAsync = async (ownerAddress: string,
- amountInBaseUnits: BigNumber.BigNumber|number,
- tokenAddress: string) => {
- const amount = _.isNumber(amountInBaseUnits) ? new BigNumber(amountInBaseUnits) : amountInBaseUnits;
- await zeroEx.token.setProxyAllowanceAsync(tokenAddress, ownerAddress, amount);
- };
before('fetch tokens', async () => {
tokens = await zeroEx.tokenRegistry.getTokensAsync();
_.forEach(tokens, token => {
@@ -132,9 +120,9 @@ describe('ExchangeWrapper', () => {
beforeEach('setup', async () => {
maker = userAddresses[0];
taker = userAddresses[1];
- await setAllowanceAsync(maker, 5, addressBySymbol.MLN);
- await setBalanceAsync(taker, 5, addressBySymbol.GNT);
- await setAllowanceAsync(taker, 5, addressBySymbol.GNT);
+ await zeroEx.token.setProxyAllowanceAsync(addressBySymbol.MLN, maker, new BigNumber(5));
+ await zeroEx.token.transferAsync(addressBySymbol.GNT, maker, taker, new BigNumber(5));
+ await zeroEx.token.setProxyAllowanceAsync(addressBySymbol.GNT, taker, new BigNumber(5));
});
afterEach('reset default account', () => {
zeroEx.setDefaultAccount(userAddresses[0]);