aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/background.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r--app/scripts/background.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js
index cc137616a..14293ab05 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -6,8 +6,7 @@ const combineStreams = require('pumpify')
const extend = require('xtend')
const EthStore = require('eth-store')
const PortStream = require('./lib/port-stream.js')
-const MetaMaskProvider = require('web3-provider-engine/zero.js')
-const EtherscanProvider = require('web3-provider-engine/subproviders/etherscan')
+const MetaMaskProvider = require('./lib/zero.js')
const IdentityStore = require('./lib/idStore')
const createTxNotification = require('./lib/tx-notification.js')
const configManager = require('./lib/config-manager-singleton')
@@ -48,16 +47,9 @@ var providerOpts = {
},
approveTransaction: addUnconfirmedTx,
signTransaction: idStore.signTransaction.bind(idStore),
+ etherscan: providerConfig.type === 'etherscan',
}
-var provider
-switch (providerConfig.type) {
- case 'rpc':
- provider = MetaMaskProvider(providerOpts)
- break
- case 'etherscan':
- provider = EtherscanProvider(providerOpts)
- break
-}
+var provider = MetaMaskProvider(providerOpts)
// log new blocks
provider.on('block', function(block){