aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-12-12 22:30:04 +0800
committerGitHub <noreply@github.com>2017-12-12 22:30:04 +0800
commitcb7188d47390719b74d7e09c938068a9f201c1b0 (patch)
tree1b67b0b849550bea8b5ad20fe4d7a383ec49163d /packages/website
parent02f22d91555ea05fc52d342e9c91cd9477321da1 (diff)
parentd778378b37b0cbd77ecdf8d1cafc7720682064ec (diff)
downloaddexon-sol-tools-cb7188d47390719b74d7e09c938068a9f201c1b0.tar
dexon-sol-tools-cb7188d47390719b74d7e09c938068a9f201c1b0.tar.gz
dexon-sol-tools-cb7188d47390719b74d7e09c938068a9f201c1b0.tar.bz2
dexon-sol-tools-cb7188d47390719b74d7e09c938068a9f201c1b0.tar.lz
dexon-sol-tools-cb7188d47390719b74d7e09c938068a9f201c1b0.tar.xz
dexon-sol-tools-cb7188d47390719b74d7e09c938068a9f201c1b0.tar.zst
dexon-sol-tools-cb7188d47390719b74d7e09c938068a9f201c1b0.zip
Merge pull request #257 from 0xProject/fix/ethereum-address
Remove ethereum-address dependency and add this logic to the repo
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/package.json1
-rw-r--r--packages/website/ts/components/inputs/address_input.tsx4
-rw-r--r--packages/website/ts/globals.d.ts5
3 files changed, 2 insertions, 8 deletions
diff --git a/packages/website/package.json b/packages/website/package.json
index 5162a27ff..f005668f8 100644
--- a/packages/website/package.json
+++ b/packages/website/package.json
@@ -28,7 +28,6 @@
"dateformat": "^2.0.0",
"deep-equal": "^1.0.1",
"dharma-loan-frame": "^0.0.12",
- "ethereum-address": "^0.0.4",
"ethereumjs-tx": "^1.3.3",
"ethereumjs-util": "^5.1.1",
"find-versions": "^2.0.0",
diff --git a/packages/website/ts/components/inputs/address_input.tsx b/packages/website/ts/components/inputs/address_input.tsx
index 8b03b8d12..40ae722d9 100644
--- a/packages/website/ts/components/inputs/address_input.tsx
+++ b/packages/website/ts/components/inputs/address_input.tsx
@@ -1,4 +1,4 @@
-import {isAddress} from 'ethereum-address';
+import {addressUtils} from '@0xproject/utils';
import * as _ from 'lodash';
import {colors} from 'material-ui/styles';
import TextField from 'material-ui/TextField';
@@ -62,7 +62,7 @@ export class AddressInput extends React.Component<AddressInputProps, AddressInpu
}
private onOrderTakerAddressUpdated(e: any) {
const address = e.target.value.toLowerCase();
- const isValidAddress = isAddress(address) || address === '';
+ const isValidAddress = addressUtils.isAddress(address) || address === '';
const errMsg = isValidAddress ? '' : 'Invalid ethereum address';
this.setState({
address,
diff --git a/packages/website/ts/globals.d.ts b/packages/website/ts/globals.d.ts
index b4611f583..3144d7eb5 100644
--- a/packages/website/ts/globals.d.ts
+++ b/packages/website/ts/globals.d.ts
@@ -55,11 +55,6 @@ interface System {
}
declare var System: System;
-// ethereum-address declarations
-declare module 'ethereum-address' {
- export const isAddress: (address: string) => boolean;
-}
-
// jsonschema declarations
// Source: https://github.com/tdegrunt/jsonschema/blob/master/lib/index.d.ts
declare interface Schema {