aboutsummaryrefslogtreecommitdiffstats
path: root/packages/kovan-faucets/src/ts/handler.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-12-14 07:05:57 +0800
committerBrandon Millman <brandon.millman@gmail.com>2017-12-14 07:05:57 +0800
commit6ba4ed99c42b4976902046625790698b490c3e0e (patch)
tree5b41b8911e12569f669fc7b30f3ea2cc19a33611 /packages/kovan-faucets/src/ts/handler.ts
parentaec3c8319159cf92d33b48e75327ee60bf4b29de (diff)
downloaddexon-sol-tools-6ba4ed99c42b4976902046625790698b490c3e0e.tar
dexon-sol-tools-6ba4ed99c42b4976902046625790698b490c3e0e.tar.gz
dexon-sol-tools-6ba4ed99c42b4976902046625790698b490c3e0e.tar.bz2
dexon-sol-tools-6ba4ed99c42b4976902046625790698b490c3e0e.tar.lz
dexon-sol-tools-6ba4ed99c42b4976902046625790698b490c3e0e.tar.xz
dexon-sol-tools-6ba4ed99c42b4976902046625790698b490c3e0e.tar.zst
dexon-sol-tools-6ba4ed99c42b4976902046625790698b490c3e0e.zip
Fix hanging requests by importing web3 last
Diffstat (limited to 'packages/kovan-faucets/src/ts/handler.ts')
-rw-r--r--packages/kovan-faucets/src/ts/handler.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/kovan-faucets/src/ts/handler.ts b/packages/kovan-faucets/src/ts/handler.ts
index d76a29514..1c6866a1c 100644
--- a/packages/kovan-faucets/src/ts/handler.ts
+++ b/packages/kovan-faucets/src/ts/handler.ts
@@ -1,6 +1,5 @@
import * as express from 'express';
import * as _ from 'lodash';
-import * as Web3 from 'web3';
import ProviderEngine = require('web3-provider-engine');
import HookedWalletSubprovider = require('web3-provider-engine/subproviders/hooked-wallet');
import NonceSubprovider = require('web3-provider-engine/subproviders/nonce-tracker');
@@ -12,6 +11,12 @@ import {idManagement} from './id_management';
import {utils} from './utils';
import {ZRXRequestQueue} from './zrx_request_queue';
+// HACK: web3 leaks XMLHttpRequest into the global scope and causes requests to hang
+// because they are using the wrong XHR package.
+// Issue: https://github.com/trufflesuite/truffle-contract/issues/14
+// tslint:disable-next-line:ordered-imports
+import * as Web3 from 'web3';
+
export class Handler {
private etherRequestQueue: EtherRequestQueue;
private zrxRequestQueue: ZRXRequestQueue;