aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-19 15:47:29 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-19 15:47:29 +0800
commit26f20fa3e32e963929a7449047d15327c3b445b0 (patch)
treea08699e03bf794bbbb046dd8245adaedf698d49f
parentf2d08ce3d99eb6c399b8328615e3d24be63115b6 (diff)
downloaddexon-sol-tools-26f20fa3e32e963929a7449047d15327c3b445b0.tar
dexon-sol-tools-26f20fa3e32e963929a7449047d15327c3b445b0.tar.gz
dexon-sol-tools-26f20fa3e32e963929a7449047d15327c3b445b0.tar.bz2
dexon-sol-tools-26f20fa3e32e963929a7449047d15327c3b445b0.tar.lz
dexon-sol-tools-26f20fa3e32e963929a7449047d15327c3b445b0.tar.xz
dexon-sol-tools-26f20fa3e32e963929a7449047d15327c3b445b0.tar.zst
dexon-sol-tools-26f20fa3e32e963929a7449047d15327c3b445b0.zip
Rename LogErrorArgs to LogErrorEventArgs and EventArgs to ContractEventArgs
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts4
-rw-r--r--src/index.ts4
-rw-r--r--src/types.ts6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 0b191ed93..3ffe927c7 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -22,7 +22,7 @@ import {
ContractResponse,
OrderCancellationRequest,
OrderFillRequest,
- LogErrorArgs,
+ LogErrorContractEventArgs,
} from '../types';
import {assert} from '../utils/assert';
import {utils} from '../utils/utils';
@@ -713,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 as LogErrorArgs).errorId.toNumber()
+ const errCode = (errEvent.args as LogErrorContractEventArgs).errorId.toNumber()
const errMessage = this._exchangeContractErrCodesToMsg[errCode];
throw new Error(errMessage);
}
diff --git a/src/index.ts b/src/index.ts
index f9037124d..109718462 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -19,9 +19,9 @@ export {
OrderCancellationRequest,
OrderFillRequest,
ContractEventEmitter,
- LogErrorArgs,
+ LogErrorContractEventArgs,
LogCancelArgs,
LogFillArgs,
- EventArgs,
+ ContractEventArgs,
Web3Provider,
} from './types';
diff --git a/src/types.ts b/src/types.ts
index f15e05d1a..c4191ebd8 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -191,7 +191,7 @@ export interface ContractEvent {
address: string;
type: string;
event: string;
- args: EventArgs;
+ args: ContractEventArgs;
}
export interface LogFillArgs {
@@ -217,11 +217,11 @@ export interface LogCancelArgs {
tokens: string;
orderHash: string;
}
-export interface LogErrorArgs {
+export interface LogErrorContractEventArgs {
errorId: BigNumber.BigNumber;
orderHash: string;
}
-export type EventArgs = LogFillArgs|LogCancelArgs|LogErrorArgs;
+export type ContractEventArgs = LogFillArgs|LogCancelArgs|LogErrorContractEventArgs;
export interface Order {
maker: string;