aboutsummaryrefslogtreecommitdiffstats
path: root/packages/assert/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/assert/src')
-rw-r--r--packages/assert/src/globals.d.ts4
-rw-r--r--packages/assert/src/index.ts6
2 files changed, 3 insertions, 7 deletions
diff --git a/packages/assert/src/globals.d.ts b/packages/assert/src/globals.d.ts
index cc47f3113..91ed2021e 100644
--- a/packages/assert/src/globals.d.ts
+++ b/packages/assert/src/globals.d.ts
@@ -1,5 +1 @@
declare module 'dirty-chai';
-
-declare module 'ethereum-address' {
- const isAddress: (arg: any) => boolean;
-}
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`,
);
},