From 75f637bd756fd7d4480792ead7bd86dd8326e622 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 19 Dec 2017 16:22:57 +0100 Subject: Throw a better error message when taker is null|undefined or anything but not a string --- packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'packages/0x.js/src/contract_wrappers') diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts index df793aa06..70d2be7e9 100644 --- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts @@ -162,7 +162,7 @@ export class ExchangeWrapper extends ContractWrapper { * @param orderTransactionOpts Optional arguments this method accepts. * @return Transaction hash. */ - @decorators.contractCallErrorHandler + @decorators.asyncZeroExErrorHandler public async fillOrderAsync(signedOrder: SignedOrder, fillTakerTokenAmount: BigNumber, shouldThrowOnInsufficientBalanceOrAllowance: boolean, takerAddress: string, @@ -218,7 +218,7 @@ export class ExchangeWrapper extends ContractWrapper { * @param orderTransactionOpts Optional arguments this method accepts. * @return Transaction hash. */ - @decorators.contractCallErrorHandler + @decorators.asyncZeroExErrorHandler public async fillOrdersUpToAsync(signedOrders: SignedOrder[], fillTakerTokenAmount: BigNumber, shouldThrowOnInsufficientBalanceOrAllowance: boolean, takerAddress: string, @@ -299,7 +299,7 @@ export class ExchangeWrapper extends ContractWrapper { * @param orderTransactionOpts Optional arguments this method accepts. * @return Transaction hash. */ - @decorators.contractCallErrorHandler + @decorators.asyncZeroExErrorHandler public async batchFillOrdersAsync(orderFillRequests: OrderFillRequest[], shouldThrowOnInsufficientBalanceOrAllowance: boolean, takerAddress: string, @@ -372,7 +372,7 @@ export class ExchangeWrapper extends ContractWrapper { * @param orderTransactionOpts Optional arguments this method accepts. * @return Transaction hash. */ - @decorators.contractCallErrorHandler + @decorators.asyncZeroExErrorHandler public async fillOrKillOrderAsync(signedOrder: SignedOrder, fillTakerTokenAmount: BigNumber, takerAddress: string, orderTransactionOpts: OrderTransactionOpts = {}): Promise { @@ -417,7 +417,7 @@ export class ExchangeWrapper extends ContractWrapper { * @param orderTransactionOpts Optional arguments this method accepts. * @return Transaction hash. */ - @decorators.contractCallErrorHandler + @decorators.asyncZeroExErrorHandler public async batchFillOrKillAsync(orderFillRequests: OrderFillRequest[], takerAddress: string, orderTransactionOpts: OrderTransactionOpts = {}): Promise { @@ -485,7 +485,7 @@ export class ExchangeWrapper extends ContractWrapper { * @param transactionOpts Optional arguments this method accepts. * @return Transaction hash. */ - @decorators.contractCallErrorHandler + @decorators.asyncZeroExErrorHandler public async cancelOrderAsync(order: Order|SignedOrder, cancelTakerTokenAmount: BigNumber, orderTransactionOpts: OrderTransactionOpts = {}): Promise { @@ -526,7 +526,7 @@ export class ExchangeWrapper extends ContractWrapper { * @param transactionOpts Optional arguments this method accepts. * @return Transaction hash. */ - @decorators.contractCallErrorHandler + @decorators.asyncZeroExErrorHandler public async batchCancelOrdersAsync(orderCancellationRequests: OrderCancellationRequest[], orderTransactionOpts: OrderTransactionOpts = {}): Promise { assert.doesConformToSchema('orderCancellationRequests', orderCancellationRequests, -- cgit v1.2.3