diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-03 13:07:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-03 13:07:00 +0800 |
commit | 4dbb2ed167ff93cc5e5bb0daea5a272eef01baf3 (patch) | |
tree | 93f15ba9ad448d9390db38b76c601ac41e4f4eeb /packages/website/ts/blockchain.ts | |
parent | 4a57f2a762619932a882d08e62006e83a584a684 (diff) | |
parent | 212d680a477917817138790560d88d06cea5ec6f (diff) | |
download | dexon-sol-tools-4dbb2ed167ff93cc5e5bb0daea5a272eef01baf3.tar dexon-sol-tools-4dbb2ed167ff93cc5e5bb0daea5a272eef01baf3.tar.gz dexon-sol-tools-4dbb2ed167ff93cc5e5bb0daea5a272eef01baf3.tar.bz2 dexon-sol-tools-4dbb2ed167ff93cc5e5bb0daea5a272eef01baf3.tar.lz dexon-sol-tools-4dbb2ed167ff93cc5e5bb0daea5a272eef01baf3.tar.xz dexon-sol-tools-4dbb2ed167ff93cc5e5bb0daea5a272eef01baf3.tar.zst dexon-sol-tools-4dbb2ed167ff93cc5e5bb0daea5a272eef01baf3.zip |
Merge pull request #427 from 0xProject/fix/doc_bugs
Miscellaneous Doc Fixes
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r-- | packages/website/ts/blockchain.ts | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index 85b4e892f..156dc44e8 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -69,14 +69,6 @@ export class Blockchain { private _cachedProviderNetworkId: number; private _ledgerSubprovider: LedgerWalletSubprovider; private _defaultGasPrice: BigNumber; - private static async _onPageLoadAsync(): Promise<void> { - if (document.readyState === 'complete') { - return; // Already loaded - } - return new Promise<void>((resolve, reject) => { - window.onload = () => resolve(); - }); - } private static _getNameGivenProvider(provider: Web3.Provider): string { if (!_.isUndefined((provider as any).isMetaMask)) { return constants.PROVIDER_NAME_METAMASK; @@ -710,7 +702,7 @@ export class Blockchain { return tokenByAddress; } private async _onPageLoadInitFireAndForgetAsync() { - await Blockchain._onPageLoadAsync(); // wait for page to load + await utils.onPageLoadAsync(); // wait for page to load // Hack: We need to know the networkId the injectedWeb3 is connected to (if it is defined) in // order to properly instantiate the web3Wrapper. Since we must use the async call, we cannot |