diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-04-10 01:32:51 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:17 +0800 |
commit | 5d05a2da7416d37da81d004d489c69d7326d9cce (patch) | |
tree | a0192957146eabb83e96bfb4266fbe2af5e81156 /packages/contracts/src/utils/formatters.ts | |
parent | 2f639b77bbcad9884b25536787e1d35a2eee2e34 (diff) | |
download | dexon-sol-tools-5d05a2da7416d37da81d004d489c69d7326d9cce.tar.gz dexon-sol-tools-5d05a2da7416d37da81d004d489c69d7326d9cce.tar.zst dexon-sol-tools-5d05a2da7416d37da81d004d489c69d7326d9cce.zip |
Revert variable naming
Diffstat (limited to 'packages/contracts/src/utils/formatters.ts')
-rw-r--r-- | packages/contracts/src/utils/formatters.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/contracts/src/utils/formatters.ts b/packages/contracts/src/utils/formatters.ts index d70c03cb8..fce10c448 100644 --- a/packages/contracts/src/utils/formatters.ts +++ b/packages/contracts/src/utils/formatters.ts @@ -5,27 +5,27 @@ import { orderUtils } from './order_utils'; import { BatchCancelOrders, BatchFillOrders, MarketBuyOrders, MarketSellOrders, SignedOrder } from './types'; export const formatters = { - createBatchFill(signedOrders: SignedOrder[], takerSellAmounts: BigNumber[] = []) { + createBatchFill(signedOrders: SignedOrder[], takerTokenFillAmounts: BigNumber[] = []) { const batchFill: BatchFillOrders = { orders: [], signatures: [], - takerSellAmounts, + takerTokenFillAmounts, }; _.forEach(signedOrders, signedOrder => { const orderStruct = orderUtils.getOrderStruct(signedOrder); batchFill.orders.push(orderStruct); batchFill.signatures.push(signedOrder.signature); - if (takerSellAmounts.length < signedOrders.length) { - batchFill.takerSellAmounts.push(signedOrder.makerBuyAmount); + if (takerTokenFillAmounts.length < signedOrders.length) { + batchFill.takerTokenFillAmounts.push(signedOrder.takerTokenAmount); } }); return batchFill; }, - createMarketSellOrders(signedOrders: SignedOrder[], takerSellAmount: BigNumber) { + createMarketSellOrders(signedOrders: SignedOrder[], takerTokenFillAmount: BigNumber) { const marketSellOrders: MarketSellOrders = { orders: [], signatures: [], - takerSellAmount, + takerTokenFillAmount, }; _.forEach(signedOrders, signedOrder => { const orderStruct = orderUtils.getOrderStruct(signedOrder); @@ -34,11 +34,11 @@ export const formatters = { }); return marketSellOrders; }, - createMarketBuyOrders(signedOrders: SignedOrder[], takerBuyAmount: BigNumber) { + createMarketBuyOrders(signedOrders: SignedOrder[], makerTokenFillAmount: BigNumber) { const marketBuyOrders: MarketBuyOrders = { orders: [], signatures: [], - takerBuyAmount, + makerTokenFillAmount, }; _.forEach(signedOrders, signedOrder => { const orderStruct = orderUtils.getOrderStruct(signedOrder); |