aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-13 01:38:13 +0800
committerFabio Berger <me@fabioberger.com>2017-12-13 01:38:13 +0800
commit4f72c527def4adef60200b60f9bf6221956af7a3 (patch)
treecfe74030bf9ebbfee9063da6faa878f995b65715 /packages/subproviders
parent71cb2e05d1d3d7e2abbbe319dc7a39d7d79d01ac (diff)
parentcb7188d47390719b74d7e09c938068a9f201c1b0 (diff)
downloaddexon-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/subproviders')
-rw-r--r--packages/subproviders/package.json2
-rw-r--r--packages/subproviders/src/globals.d.ts5
-rw-r--r--packages/subproviders/src/subproviders/ledger.ts4
3 files changed, 3 insertions, 8 deletions
diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json
index b724e5dae..b0c5686a6 100644
--- a/packages/subproviders/package.json
+++ b/packages/subproviders/package.json
@@ -18,9 +18,9 @@
},
"dependencies": {
"@0xproject/assert": "^0.0.7",
+ "@0xproject/utils": "^0.1.0",
"bn.js": "^4.11.8",
"es6-promisify": "^5.0.0",
- "ethereum-address": "^0.0.4",
"ethereumjs-tx": "^1.3.3",
"ethereumjs-util": "^5.1.1",
"ledgerco": "0xProject/ledger-node-js-api",
diff --git a/packages/subproviders/src/globals.d.ts b/packages/subproviders/src/globals.d.ts
index 520ca9232..400bbef5b 100644
--- a/packages/subproviders/src/globals.d.ts
+++ b/packages/subproviders/src/globals.d.ts
@@ -54,11 +54,6 @@ declare module 'ledgerco' {
}
}
-// ethereum-address declarations
-declare module 'ethereum-address' {
- export const isAddress: (address: string) => boolean;
-}
-
// Semaphore-async-await declarations
declare module 'semaphore-async-await' {
class Semaphore {
diff --git a/packages/subproviders/src/subproviders/ledger.ts b/packages/subproviders/src/subproviders/ledger.ts
index e0a08f792..578f6ff6f 100644
--- a/packages/subproviders/src/subproviders/ledger.ts
+++ b/packages/subproviders/src/subproviders/ledger.ts
@@ -1,6 +1,6 @@
import {assert} from '@0xproject/assert';
+import {addressUtils} from '@0xproject/utils';
import promisify = require('es6-promisify');
-import {isAddress} from 'ethereum-address';
import EthereumTx = require('ethereumjs-tx');
import ethUtil = require('ethereumjs-util');
import * as ledger from 'ledgerco';
@@ -47,7 +47,7 @@ export class LedgerSubprovider extends Subprovider {
return isValid;
}
private static validateSender(sender: string) {
- if (_.isUndefined(sender) || !isAddress(sender)) {
+ if (_.isUndefined(sender) || !addressUtils.isAddress(sender)) {
throw new Error(LedgerSubproviderErrors.SenderInvalidOrNotSupplied);
}
}