aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-11 19:43:19 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-11 19:43:19 +0800
commita14424ae5f45784db5e75c2d6a9098dc96914c9e (patch)
treee0cc054713cc7fff81269c4065883629f117a590 /packages/subproviders/src
parentf1e7ea118b0c8c9a9a013b09d0e63bdd3694b21a (diff)
downloaddexon-0x-contracts-a14424ae5f45784db5e75c2d6a9098dc96914c9e.tar
dexon-0x-contracts-a14424ae5f45784db5e75c2d6a9098dc96914c9e.tar.gz
dexon-0x-contracts-a14424ae5f45784db5e75c2d6a9098dc96914c9e.tar.bz2
dexon-0x-contracts-a14424ae5f45784db5e75c2d6a9098dc96914c9e.tar.lz
dexon-0x-contracts-a14424ae5f45784db5e75c2d6a9098dc96914c9e.tar.xz
dexon-0x-contracts-a14424ae5f45784db5e75c2d6a9098dc96914c9e.tar.zst
dexon-0x-contracts-a14424ae5f45784db5e75c2d6a9098dc96914c9e.zip
Move isAddress to shared utils and remove all dependencies on ethereum-address
Diffstat (limited to 'packages/subproviders/src')
-rw-r--r--packages/subproviders/src/globals.d.ts5
-rw-r--r--packages/subproviders/src/subproviders/ledger.ts4
2 files changed, 2 insertions, 7 deletions
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);
}
}