aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/blockchain.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-05 20:06:58 +0800
committerFabio Berger <me@fabioberger.com>2018-04-05 20:06:58 +0800
commit89a72ebf0dbff606d511ae51bfee7ffc0a5df18f (patch)
tree65c935c4c372d2c497bec08164b314866050192b /packages/website/ts/blockchain.ts
parent20aaab0847d0ec8b2a44f392ddd467f0c475cfb5 (diff)
parent7f7ddee0f95f3ed3e903c230088dbee4648771bd (diff)
downloaddexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.gz
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.bz2
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.lz
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.xz
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.zst
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.zip
Merge branch 'development' into removeMigrateStep
* development: Fix tests Call static functions as static Address feedback Move our contract templates to accept Provider instead of Web3Wrapper
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r--packages/website/ts/blockchain.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index 72cb94c02..fd34ab82d 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -23,6 +23,7 @@ import {
LedgerWalletSubprovider,
RedundantRPCSubprovider,
} from '@0xproject/subproviders';
+import { Provider } from '@0xproject/types';
import { BigNumber, intervalUtils, logUtils, promisify } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
@@ -73,11 +74,11 @@ export class Blockchain {
private _web3Wrapper?: Web3Wrapper;
private _blockchainWatcher?: BlockchainWatcher;
private _userAddressIfExists: string;
- private _cachedProvider: Web3.Provider;
+ private _cachedProvider: Provider;
private _cachedProviderNetworkId: number;
private _ledgerSubprovider: LedgerWalletSubprovider;
private _defaultGasPrice: BigNumber;
- private static _getNameGivenProvider(provider: Web3.Provider): string {
+ private static _getNameGivenProvider(provider: Provider): string {
const providerType = utils.getProviderType(provider);
const providerNameIfExists = providerToName[providerType];
if (_.isUndefined(providerNameIfExists)) {
@@ -377,7 +378,7 @@ export class Blockchain {
}
public isValidAddress(address: string): boolean {
const lowercaseAddress = address.toLowerCase();
- return this._web3Wrapper.isAddress(lowercaseAddress);
+ return Web3Wrapper.isAddress(lowercaseAddress);
}
public async pollTokenBalanceAsync(token: Token) {
utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);