aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/utils/exchange_wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src/utils/exchange_wrapper.ts')
-rw-r--r--packages/contracts/src/utils/exchange_wrapper.ts23
1 files changed, 5 insertions, 18 deletions
diff --git a/packages/contracts/src/utils/exchange_wrapper.ts b/packages/contracts/src/utils/exchange_wrapper.ts
index 3f56fd52f..bbe9a1baf 100644
--- a/packages/contracts/src/utils/exchange_wrapper.ts
+++ b/packages/contracts/src/utils/exchange_wrapper.ts
@@ -34,17 +34,9 @@ export class ExchangeWrapper {
const tx = await this._getTxWithDecodedExchangeLogsAsync(txHash);
return tx;
}
- public async cancelOrderAsync(
- signedOrder: SignedOrder,
- from: string,
- opts: { takerTokenCancelAmount?: BigNumber } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createCancel(signedOrder, opts.takerTokenCancelAmount);
- const txHash = await this._exchange.cancelOrder.sendTransactionAsync(
- params.order,
- params.takerTokenCancelAmount,
- { from },
- );
+ public async cancelOrderAsync(signedOrder: SignedOrder, from: string): Promise<TransactionReceiptWithDecodedLogs> {
+ const params = orderUtils.createCancel(signedOrder);
+ const txHash = await this._exchange.cancelOrder.sendTransactionAsync(params.order, { from });
const tx = await this._getTxWithDecodedExchangeLogsAsync(txHash);
return tx;
}
@@ -156,14 +148,9 @@ export class ExchangeWrapper {
public async batchCancelOrdersAsync(
orders: SignedOrder[],
from: string,
- opts: { takerTokenCancelAmounts?: BigNumber[] } = {},
): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createBatchCancel(orders, opts.takerTokenCancelAmounts);
- const txHash = await this._exchange.batchCancelOrders.sendTransactionAsync(
- params.orders,
- params.takerTokenCancelAmounts,
- { from },
- );
+ const params = formatters.createBatchCancel(orders);
+ const txHash = await this._exchange.batchCancelOrders.sendTransactionAsync(params.orders, { from });
const tx = await this._getTxWithDecodedExchangeLogsAsync(txHash);
return tx;
}