aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/token_wrapper.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-08-28 22:47:49 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-08-28 22:49:57 +0800
commit96da2c26dceca03340a213baae5a490df2f7183c (patch)
tree6c984b77c1cd5ca312310d7f72ad4b512ecb9df5 /src/contract_wrappers/token_wrapper.ts
parent0afc95982b195378653e15697f65d4ad3bf48e66 (diff)
downloaddexon-sol-tools-96da2c26dceca03340a213baae5a490df2f7183c.tar
dexon-sol-tools-96da2c26dceca03340a213baae5a490df2f7183c.tar.gz
dexon-sol-tools-96da2c26dceca03340a213baae5a490df2f7183c.tar.bz2
dexon-sol-tools-96da2c26dceca03340a213baae5a490df2f7183c.tar.lz
dexon-sol-tools-96da2c26dceca03340a213baae5a490df2f7183c.tar.xz
dexon-sol-tools-96da2c26dceca03340a213baae5a490df2f7183c.tar.zst
dexon-sol-tools-96da2c26dceca03340a213baae5a490df2f7183c.zip
Use 0x-json-schemas
Diffstat (limited to 'src/contract_wrappers/token_wrapper.ts')
-rw-r--r--src/contract_wrappers/token_wrapper.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts
index a2812ccdb..51490359e 100644
--- a/src/contract_wrappers/token_wrapper.ts
+++ b/src/contract_wrappers/token_wrapper.ts
@@ -1,5 +1,6 @@
import * as _ from 'lodash';
import * as BigNumber from 'bignumber.js';
+import {SchemaValidator, schemas} from '0x-json-schemas';
import {Web3Wrapper} from '../web3_wrapper';
import {assert} from '../utils/assert';
import {utils} from '../utils/utils';
@@ -8,8 +9,6 @@ import {constants} from '../utils/constants';
import {ContractWrapper} from './contract_wrapper';
import * as TokenArtifacts from '../artifacts/Token.json';
import * as TokenTransferProxyArtifacts from '../artifacts/TokenTransferProxy.json';
-import {subscriptionOptsSchema} from '../schemas/subscription_opts_schema';
-import {indexFilterValuesSchema} from '../schemas/index_filter_values_schema';
import {
TokenContract,
ZeroExError,
@@ -230,8 +229,8 @@ export class TokenWrapper extends ContractWrapper {
indexFilterValues: IndexedFilterValues): Promise<ContractEventEmitter> {
assert.isETHAddressHex('tokenAddress', tokenAddress);
assert.doesBelongToStringEnum('eventName', eventName, TokenEvents);
- assert.doesConformToSchema('subscriptionOpts', subscriptionOpts, subscriptionOptsSchema);
- assert.doesConformToSchema('indexFilterValues', indexFilterValues, indexFilterValuesSchema);
+ assert.doesConformToSchema('subscriptionOpts', subscriptionOpts, schemas.subscriptionOptsSchema);
+ assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
const tokenContract = await this._getTokenContractAsync(tokenAddress);
let createLogEvent: CreateContractEvent;
switch (eventName) {