Merge branch 'master' into i2826-SignBytes

feature/default_network_editable
Dan Finlay 7 years ago committed by GitHub
commit 5fb2cfed6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      app/scripts/controllers/network.js
  2. 2
      notices/archive/notice_2.md
  3. 2
      notices/notices.json
  4. 4
      package.json

@ -1,6 +1,7 @@
const assert = require('assert') const assert = require('assert')
const EventEmitter = require('events') const EventEmitter = require('events')
const createMetamaskProvider = require('web3-provider-engine/zero.js') const createMetamaskProvider = require('web3-provider-engine/zero.js')
const SubproviderFromProvider = require('web3-provider-engine/subproviders/web3.js')
const createInfuraProvider = require('eth-json-rpc-infura/src/createProvider') const createInfuraProvider = require('eth-json-rpc-infura/src/createProvider')
const ObservableStore = require('obs-store') const ObservableStore = require('obs-store')
const ComposedStore = require('obs-store/lib/composed') const ComposedStore = require('obs-store/lib/composed')
@ -133,15 +134,17 @@ module.exports = class NetworkController extends EventEmitter {
_configureInfuraProvider (opts) { _configureInfuraProvider (opts) {
log.info('_configureInfuraProvider', opts) log.info('_configureInfuraProvider', opts)
const blockTrackerProvider = createInfuraProvider({ const infuraProvider = createInfuraProvider({
network: opts.type, network: opts.type,
}) })
const infuraSubprovider = new SubproviderFromProvider(infuraProvider)
const providerParams = extend(this._baseProviderParams, { const providerParams = extend(this._baseProviderParams, {
rpcUrl: opts.rpcUrl, rpcUrl: opts.rpcUrl,
engineParams: { engineParams: {
pollingInterval: 8000, pollingInterval: 8000,
blockTrackerProvider, blockTrackerProvider: infuraProvider,
}, },
dataSubprovider: infuraSubprovider,
}) })
const provider = createMetamaskProvider(providerParams) const provider = createMetamaskProvider(providerParams)
this._setProvider(provider) this._setProvider(provider)

@ -4,5 +4,3 @@ When you log in to MetaMask, your current account is visible to every new site y
For your privacy, for now, please sign out of MetaMask when you're done using a site. For your privacy, for now, please sign out of MetaMask when you're done using a site.
Also, by default, you will be signed in to a test network. To use real Ether, you must connect to the main network manually in the top left network menu.

File diff suppressed because one or more lines are too long

@ -73,7 +73,7 @@
"eth-block-tracker": "^2.2.0", "eth-block-tracker": "^2.2.0",
"eth-contract-metadata": "^1.1.4", "eth-contract-metadata": "^1.1.4",
"eth-json-rpc-filters": "^1.2.5", "eth-json-rpc-filters": "^1.2.5",
"eth-json-rpc-infura": "^1.0.2", "eth-json-rpc-infura": "^2.0.5",
"eth-keyring-controller": "^2.1.4", "eth-keyring-controller": "^2.1.4",
"eth-phishing-detect": "^1.1.4", "eth-phishing-detect": "^1.1.4",
"eth-query": "^2.1.2", "eth-query": "^2.1.2",
@ -150,7 +150,7 @@
"valid-url": "^1.0.9", "valid-url": "^1.0.9",
"vreme": "^3.0.2", "vreme": "^3.0.2",
"web3": "^0.20.1", "web3": "^0.20.1",
"web3-provider-engine": "^13.4.0", "web3-provider-engine": "^13.5.0",
"web3-stream-provider": "^3.0.1", "web3-stream-provider": "^3.0.1",
"xtend": "^4.0.1" "xtend": "^4.0.1"
}, },

Loading…
Cancel
Save