diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-28 07:15:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 07:15:18 +0800 |
commit | 54ef916b93ba0939dcb8824149c9a9fb74df4f2e (patch) | |
tree | 6559179e99d077ae8d78350580a082e75d50a7c8 /packages/assert/src/index.ts | |
parent | 4a770dee84ee49e8038da7dd32ce26338176bf36 (diff) | |
parent | f862a2af6d9802c2c75f813025517e0c52cd513c (diff) | |
download | dexon-0x-contracts-54ef916b93ba0939dcb8824149c9a9fb74df4f2e.tar dexon-0x-contracts-54ef916b93ba0939dcb8824149c9a9fb74df4f2e.tar.gz dexon-0x-contracts-54ef916b93ba0939dcb8824149c9a9fb74df4f2e.tar.bz2 dexon-0x-contracts-54ef916b93ba0939dcb8824149c9a9fb74df4f2e.tar.lz dexon-0x-contracts-54ef916b93ba0939dcb8824149c9a9fb74df4f2e.tar.xz dexon-0x-contracts-54ef916b93ba0939dcb8824149c9a9fb74df4f2e.tar.zst dexon-0x-contracts-54ef916b93ba0939dcb8824149c9a9fb74df4f2e.zip |
Merge pull request #233 from 0xProject/feature/passNetworkId
Forces the users of 0x.js to pass the network id
Diffstat (limited to 'packages/assert/src/index.ts')
-rw-r--r-- | packages/assert/src/index.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/assert/src/index.ts b/packages/assert/src/index.ts index eb224223f..92bcf6f03 100644 --- a/packages/assert/src/index.ts +++ b/packages/assert/src/index.ts @@ -1,11 +1,11 @@ +import { + Schema, + SchemaValidator, +} from '@0xproject/json-schemas'; import BigNumber from 'bignumber.js'; import * as ethereum_address from 'ethereum-address'; import * as _ from 'lodash'; import * as validUrl from 'valid-url'; -import { - SchemaValidator, - Schema, -} from '@0xproject/json-schemas'; const HEX_REGEX = /^0x[0-9A-F]*$/i; @@ -62,7 +62,7 @@ export const assert = { this.assert(_.isBoolean(value), this.typeAssertionMessage(variableName, 'boolean', value)); }, isWeb3Provider(variableName: string, value: any): void { - const isWeb3Provider = _.isFunction((value as any).send) || _.isFunction((value as any).sendAsync); + const isWeb3Provider = _.isFunction((value).send) || _.isFunction((value).sendAsync); this.assert(isWeb3Provider, this.typeAssertionMessage(variableName, 'Web3.Provider', value)); }, doesConformToSchema(variableName: string, value: any, schema: Schema): void { |