aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-01 23:38:25 +0800
committerFabio Berger <me@fabioberger.com>2017-06-01 23:38:25 +0800
commit3a4020c78b9b22a52db0f964ac20ced905fa1bcd (patch)
treec4d6e539700ec3e4eb252363dc28b6dca72cf665 /test
parent35b7a60e9704e5ab222dc7552cbe523d12dcb003 (diff)
parent39957df2c3cd676625d6ebda0fe24f52cd1d3134 (diff)
downloaddexon-sol-tools-3a4020c78b9b22a52db0f964ac20ced905fa1bcd.tar
dexon-sol-tools-3a4020c78b9b22a52db0f964ac20ced905fa1bcd.tar.gz
dexon-sol-tools-3a4020c78b9b22a52db0f964ac20ced905fa1bcd.tar.bz2
dexon-sol-tools-3a4020c78b9b22a52db0f964ac20ced905fa1bcd.tar.lz
dexon-sol-tools-3a4020c78b9b22a52db0f964ac20ced905fa1bcd.tar.xz
dexon-sol-tools-3a4020c78b9b22a52db0f964ac20ced905fa1bcd.tar.zst
dexon-sol-tools-3a4020c78b9b22a52db0f964ac20ced905fa1bcd.zip
Merge branch 'fillOrderAsync' of github.com:0xProject/0x.js into fillOrderAsync
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]);