diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-06-19 15:48:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 15:48:08 +0800 |
commit | ed1e2e534761c74de908a6144507a5df4e916d7e (patch) | |
tree | a08699e03bf794bbbb046dd8245adaedf698d49f /src/contract_wrappers | |
parent | 5932ebb52a4421ab56c9b855f29bc26349e2ebd0 (diff) | |
parent | 26f20fa3e32e963929a7449047d15327c3b445b0 (diff) | |
download | dexon-sol-tools-ed1e2e534761c74de908a6144507a5df4e916d7e.tar dexon-sol-tools-ed1e2e534761c74de908a6144507a5df4e916d7e.tar.gz dexon-sol-tools-ed1e2e534761c74de908a6144507a5df4e916d7e.tar.bz2 dexon-sol-tools-ed1e2e534761c74de908a6144507a5df4e916d7e.tar.lz dexon-sol-tools-ed1e2e534761c74de908a6144507a5df4e916d7e.tar.xz dexon-sol-tools-ed1e2e534761c74de908a6144507a5df4e916d7e.tar.zst dexon-sol-tools-ed1e2e534761c74de908a6144507a5df4e916d7e.zip |
Merge pull request #66 from 0xProject/event-types
Add actual type for contract event arguments
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 3 |
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..3ffe927c7 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -22,6 +22,7 @@ import { ContractResponse, OrderCancellationRequest, OrderFillRequest, + LogErrorContractEventArgs, } 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 LogErrorContractEventArgs).errorId.toNumber() const errMessage = this._exchangeContractErrCodesToMsg[errCode]; throw new Error(errMessage); } |