diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-13 01:38:13 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-13 01:38:13 +0800 |
commit | 4f72c527def4adef60200b60f9bf6221956af7a3 (patch) | |
tree | cfe74030bf9ebbfee9063da6faa878f995b65715 /packages/assert/src/index.ts | |
parent | 71cb2e05d1d3d7e2abbbe319dc7a39d7d79d01ac (diff) | |
parent | cb7188d47390719b74d7e09c938068a9f201c1b0 (diff) | |
download | dexon-sol-tools-4f72c527def4adef60200b60f9bf6221956af7a3.tar dexon-sol-tools-4f72c527def4adef60200b60f9bf6221956af7a3.tar.gz dexon-sol-tools-4f72c527def4adef60200b60f9bf6221956af7a3.tar.bz2 dexon-sol-tools-4f72c527def4adef60200b60f9bf6221956af7a3.tar.lz dexon-sol-tools-4f72c527def4adef60200b60f9bf6221956af7a3.tar.xz dexon-sol-tools-4f72c527def4adef60200b60f9bf6221956af7a3.tar.zst dexon-sol-tools-4f72c527def4adef60200b60f9bf6221956af7a3.zip |
Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
Re-hard code the dependency
Add missing dependency
Add missing dependency
Fix a dependency
Fix an invocation
Move dependency
Merge dependencies
Don't unsubscribe on error. It's done automatically
Rename blockAndLogStreamer to blockAndLogStreamerIfExists
Move isAddress to shared utils and remove all dependencies on ethereum-address
Remove ethereum-address dependency and add this logic to the repo
Diffstat (limited to 'packages/assert/src/index.ts')
-rw-r--r-- | packages/assert/src/index.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/assert/src/index.ts b/packages/assert/src/index.ts index 92bcf6f03..fadc31d09 100644 --- a/packages/assert/src/index.ts +++ b/packages/assert/src/index.ts @@ -2,8 +2,8 @@ import { Schema, SchemaValidator, } from '@0xproject/json-schemas'; +import {addressUtils} from '@0xproject/utils'; import BigNumber from 'bignumber.js'; -import * as ethereum_address from 'ethereum-address'; import * as _ from 'lodash'; import * as validUrl from 'valid-url'; @@ -35,9 +35,9 @@ export const assert = { this.typeAssertionMessage(variableName, 'HexString', value)); }, isETHAddressHex(variableName: string, value: string): void { - this.assert(ethereum_address.isAddress(value), this.typeAssertionMessage(variableName, 'ETHAddressHex', value)); + this.assert(addressUtils.isAddress(value), this.typeAssertionMessage(variableName, 'ETHAddressHex', value)); this.assert( - ethereum_address.isAddress(value) && value.toLowerCase() === value, + addressUtils.isAddress(value) && value.toLowerCase() === value, `Checksummed addresses are not supported. Convert ${variableName} to lower case before passing`, ); }, |