diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-01 20:57:34 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-01 20:57:34 +0800 |
commit | 75d0b69db294a58b8fdca330d4724ecf758d65f2 (patch) | |
tree | 58c6587628f71b48533ccd21621649a4ee6eb3b8 /test | |
parent | ef7ac6ac2df34cc45bce461bbbf0e83be5187aed (diff) | |
download | dexon-sol-tools-75d0b69db294a58b8fdca330d4724ecf758d65f2.tar dexon-sol-tools-75d0b69db294a58b8fdca330d4724ecf758d65f2.tar.gz dexon-sol-tools-75d0b69db294a58b8fdca330d4724ecf758d65f2.tar.bz2 dexon-sol-tools-75d0b69db294a58b8fdca330d4724ecf758d65f2.tar.lz dexon-sol-tools-75d0b69db294a58b8fdca330d4724ecf758d65f2.tar.xz dexon-sol-tools-75d0b69db294a58b8fdca330d4724ecf758d65f2.tar.zst dexon-sol-tools-75d0b69db294a58b8fdca330d4724ecf758d65f2.zip |
Add taker parameter to createSignedOrder
Diffstat (limited to 'test')
-rw-r--r-- | test/exchange_wrapper_test.ts | 6 | ||||
-rw-r--r-- | test/utils/order_factory.ts | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index 352eb9e05..b2fb1894b 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -128,7 +128,9 @@ describe('ExchangeWrapper', () => { }); describe('failed fills', () => { it('should throw when the fill amount is zero', async () => { - const signedOrder = await orderFactory.createSignedOrderAsync(zeroEx, networkId, userAddresses[0], + const maker = userAddresses[0]; + const taker = userAddresses[1]; + const signedOrder = await orderFactory.createSignedOrderAsync(zeroEx, networkId, maker, taker, 5, addressBySymbol.MLN, 5, addressBySymbol.GNT); const fillAmount = new BigNumber(0); expect(zeroEx.exchange.fillOrderAsync(signedOrder, fillAmount)) @@ -145,7 +147,7 @@ describe('ExchangeWrapper', () => { await setAllowance(maker, 5, addressBySymbol.MLN); await setBalance(taker, 5, addressBySymbol.GNT); await setAllowance(taker, 5, addressBySymbol.GNT); - const signedOrder = await orderFactory.createSignedOrderAsync(zeroEx, networkId, maker, + const signedOrder = await orderFactory.createSignedOrderAsync(zeroEx, networkId, maker, taker, 5, addressBySymbol.MLN, 5, addressBySymbol.GNT); const fillAmount = new BigNumber(5); zeroEx.setDefaultAccount(taker); diff --git a/test/utils/order_factory.ts b/test/utils/order_factory.ts index 8a7d8430e..e41e973ee 100644 --- a/test/utils/order_factory.ts +++ b/test/utils/order_factory.ts @@ -10,6 +10,7 @@ export const orderFactory = { zeroEx: ZeroEx, networkId: number, maker: string, + taker: string, makerTokenAmount: BigNumber.BigNumber|number, makerTokenAddress: string, takerTokenAmount: BigNumber.BigNumber|number, @@ -19,7 +20,7 @@ export const orderFactory = { const INF_TIMESTAMP = 2524604400; const order = { maker, - taker: undefined, + taker, makerFee: new BigNumber(0), takerFee: new BigNumber(0), makerTokenAmount: _.isNumber(makerTokenAmount) ? new BigNumber(makerTokenAmount) : makerTokenAmount, |