aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-01 23:16:16 +0800
committerFabio Berger <me@fabioberger.com>2017-06-01 23:16:16 +0800
commitcc0d6411071cb36a224c8f4f0cb742edb4193482 (patch)
treecd77c41e084258e43f4a9edb34928b466ec846b0 /test
parentbcc8e43ab889b98bc2ebe2f4f6c172cbef925838 (diff)
downloaddexon-0x-contracts-cc0d6411071cb36a224c8f4f0cb742edb4193482.tar.gz
dexon-0x-contracts-cc0d6411071cb36a224c8f4f0cb742edb4193482.tar.zst
dexon-0x-contracts-cc0d6411071cb36a224c8f4f0cb742edb4193482.zip
Add async suffix and fix alignment
Diffstat (limited to 'test')
-rw-r--r--test/exchange_wrapper_test.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 4d28dd2bd..d6dca0a63 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -109,15 +109,15 @@ describe('ExchangeWrapper', () => {
let networkId: number;
const addressBySymbol: {[symbol: string]: string} = {};
const shouldCheckTransfer = false;
- const setBalance = async (toAddress: string,
- amountInBaseUnits: BigNumber.BigNumber|number,
- tokenAddress: string) => {
+ 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 setAllowance = async (ownerAddress: string,
- amountInBaseUnits: BigNumber.BigNumber|number,
- tokenAddress: string) => {
+ 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);
};
@@ -154,9 +154,9 @@ describe('ExchangeWrapper', () => {
});
describe('successful fills', () => {
it('should fill the valid order', async () => {
- await setAllowance(maker, 5, addressBySymbol.MLN);
- await setBalance(taker, 5, addressBySymbol.GNT);
- await setAllowance(taker, 5, addressBySymbol.GNT);
+ await setAllowanceAsync(maker, 5, addressBySymbol.MLN);
+ await setBalanceAsync(taker, 5, addressBySymbol.GNT);
+ await setAllowanceAsync(taker, 5, addressBySymbol.GNT);
const signedOrder = await orderFactory.createSignedOrderAsync(zeroEx, networkId, maker, taker,
5, addressBySymbol.MLN, 5, addressBySymbol.GNT);
const fillAmount = new BigNumber(5);