diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-02 19:08:59 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-02 19:08:59 +0800 |
commit | 832d2ff5ca1e82c4580e47c0b101069ee7cc0fca (patch) | |
tree | b5302140396ad6b8e3e896bdc89cc6fe5a78f674 /test/utils/order_factory.ts | |
parent | e1ee6b84945e729d894f6535be02f3541e43dbf0 (diff) | |
download | dexon-0x-contracts-832d2ff5ca1e82c4580e47c0b101069ee7cc0fca.tar.gz dexon-0x-contracts-832d2ff5ca1e82c4580e47c0b101069ee7cc0fca.tar.zst dexon-0x-contracts-832d2ff5ca1e82c4580e47c0b101069ee7cc0fca.zip |
Add fill scenario with fees
Diffstat (limited to 'test/utils/order_factory.ts')
-rw-r--r-- | test/utils/order_factory.ts | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/test/utils/order_factory.ts b/test/utils/order_factory.ts index 0f370ed34..373dbddc6 100644 --- a/test/utils/order_factory.ts +++ b/test/utils/order_factory.ts @@ -10,10 +10,13 @@ export const orderFactory = { zeroEx: ZeroEx, maker: string, taker: string, - makerTokenAmount: BigNumber.BigNumber|number, + makerFee: BigNumber.BigNumber, + takerFee: BigNumber.BigNumber, + makerTokenAmount: BigNumber.BigNumber, makerTokenAddress: string, - takerTokenAmount: BigNumber.BigNumber|number, + takerTokenAmount: BigNumber.BigNumber, takerTokenAddress: string, + feeRecipient: string, expirationUnixTimestampSec?: BigNumber.BigNumber): Promise<SignedOrder> { const defaultExpirationUnixTimestampSec = new BigNumber(2524604400); // Close to infinite expirationUnixTimestampSec = _.isUndefined(expirationUnixTimestampSec) ? @@ -22,14 +25,14 @@ export const orderFactory = { const order = { maker, taker, - makerFee: new BigNumber(0), - takerFee: new BigNumber(0), - makerTokenAmount: _.isNumber(makerTokenAmount) ? new BigNumber(makerTokenAmount) : makerTokenAmount, - takerTokenAmount: _.isNumber(takerTokenAmount) ? new BigNumber(takerTokenAmount) : takerTokenAmount, + makerFee, + takerFee, + makerTokenAmount, + takerTokenAmount, makerTokenAddress, takerTokenAddress, salt: ZeroEx.generatePseudoRandomSalt(), - feeRecipient: constants.NULL_ADDRESS, + feeRecipient, expirationUnixTimestampSec, }; const orderHash = await zeroEx.getOrderHashHexAsync(order); |