diff options
Diffstat (limited to 'packages/contracts/util/formatters.ts')
-rw-r--r-- | packages/contracts/util/formatters.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/contracts/util/formatters.ts b/packages/contracts/util/formatters.ts index e16fe8d45..6c225268e 100644 --- a/packages/contracts/util/formatters.ts +++ b/packages/contracts/util/formatters.ts @@ -1,12 +1,12 @@ import { BigNumber } from '@0xproject/utils'; import * as _ from 'lodash'; -import { Order } from './order'; +import { SignedOrder } from './signed_order'; import { BatchCancelOrders, BatchFillOrders, FillOrdersUpTo } from './types'; export const formatters = { createBatchFill( - orders: Order[], + orders: SignedOrder[], shouldThrowOnInsufficientBalanceOrAllowance: boolean, fillTakerTokenAmounts: BigNumber[] = [], ) { @@ -35,9 +35,9 @@ export const formatters = { order.params.expirationTimestampInSec, order.params.salt, ]); - batchFill.v.push(order.params.v as number); - batchFill.r.push(order.params.r as string); - batchFill.s.push(order.params.s as string); + batchFill.v.push(order.params.v); + batchFill.r.push(order.params.r); + batchFill.s.push(order.params.s); if (fillTakerTokenAmounts.length < orders.length) { batchFill.fillTakerTokenAmounts.push(order.params.takerTokenAmount); } @@ -45,7 +45,7 @@ export const formatters = { return batchFill; }, createFillUpTo( - orders: Order[], + orders: SignedOrder[], shouldThrowOnInsufficientBalanceOrAllowance: boolean, fillTakerTokenAmount: BigNumber, ) { @@ -74,13 +74,13 @@ export const formatters = { order.params.expirationTimestampInSec, order.params.salt, ]); - fillUpTo.v.push(order.params.v as number); - fillUpTo.r.push(order.params.r as string); - fillUpTo.s.push(order.params.s as string); + fillUpTo.v.push(order.params.v); + fillUpTo.r.push(order.params.r); + fillUpTo.s.push(order.params.s); }); return fillUpTo; }, - createBatchCancel(orders: Order[], cancelTakerTokenAmounts: BigNumber[] = []) { + createBatchCancel(orders: SignedOrder[], cancelTakerTokenAmounts: BigNumber[] = []) { const batchCancel: BatchCancelOrders = { orderAddresses: [], orderValues: [], |