From 76d6e6a7481a69c1c0100a90f30d5d28ec471e84 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 15 Jun 2017 16:21:27 +0200 Subject: Add actual type for contract event arguments --- src/contract_wrappers/exchange_wrapper.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/contract_wrappers') diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 4698089eb..0b191ed93 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -22,6 +22,7 @@ import { ContractResponse, OrderCancellationRequest, OrderFillRequest, + LogErrorArgs, } from '../types'; import {assert} from '../utils/assert'; import {utils} from '../utils/utils'; @@ -712,7 +713,7 @@ export class ExchangeWrapper extends ContractWrapper { private _throwErrorLogsAsErrors(logs: ContractEvent[]): void { const errEvent = _.find(logs, {event: 'LogError'}); if (!_.isUndefined(errEvent)) { - const errCode = errEvent.args.errorId.toNumber(); + const errCode = (errEvent.args as LogErrorArgs).errorId.toNumber() const errMessage = this._exchangeContractErrCodesToMsg[errCode]; throw new Error(errMessage); } -- cgit v1.2.3