diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-03-24 03:17:54 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:17 +0800 |
commit | 8f809e3a292c55e0f6440f9cf7c8746ede7ad583 (patch) | |
tree | 084ff67fed5dae3a3a39d452be1025800c264203 /packages/contracts/src/utils/exchange_wrapper.ts | |
parent | 3f76985435c18c5b8087f1c681310b40613093e7 (diff) | |
download | dexon-0x-contracts-8f809e3a292c55e0f6440f9cf7c8746ede7ad583.tar dexon-0x-contracts-8f809e3a292c55e0f6440f9cf7c8746ede7ad583.tar.gz dexon-0x-contracts-8f809e3a292c55e0f6440f9cf7c8746ede7ad583.tar.bz2 dexon-0x-contracts-8f809e3a292c55e0f6440f9cf7c8746ede7ad583.tar.lz dexon-0x-contracts-8f809e3a292c55e0f6440f9cf7c8746ede7ad583.tar.xz dexon-0x-contracts-8f809e3a292c55e0f6440f9cf7c8746ede7ad583.tar.zst dexon-0x-contracts-8f809e3a292c55e0f6440f9cf7c8746ede7ad583.zip |
Remove partial cancels
Diffstat (limited to 'packages/contracts/src/utils/exchange_wrapper.ts')
-rw-r--r-- | packages/contracts/src/utils/exchange_wrapper.ts | 23 |
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; } |