aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-15 22:21:27 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-15 22:21:27 +0800
commit76d6e6a7481a69c1c0100a90f30d5d28ec471e84 (patch)
treeea1fe12c633f02b8f25d75e9056764f84c7d0bff /src/contract_wrappers
parent424912040a7e68b6d07cd4ae40763d9bcd98de28 (diff)
downloaddexon-sol-tools-76d6e6a7481a69c1c0100a90f30d5d28ec471e84.tar
dexon-sol-tools-76d6e6a7481a69c1c0100a90f30d5d28ec471e84.tar.gz
dexon-sol-tools-76d6e6a7481a69c1c0100a90f30d5d28ec471e84.tar.bz2
dexon-sol-tools-76d6e6a7481a69c1c0100a90f30d5d28ec471e84.tar.lz
dexon-sol-tools-76d6e6a7481a69c1c0100a90f30d5d28ec471e84.tar.xz
dexon-sol-tools-76d6e6a7481a69c1c0100a90f30d5d28ec471e84.tar.zst
dexon-sol-tools-76d6e6a7481a69c1c0100a90f30d5d28ec471e84.zip
Add actual type for contract event arguments
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts3
1 files changed, 2 insertions, 1 deletions
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);
}