Add dev config to login automagically based on dot file (#8598)

* Add dev config to login automagically based on runtime config

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
feature/default_network_editable
ricky 5 years ago committed by GitHub
parent d488c16df5
commit c413d0905f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .gitignore
  2. 8
      app/scripts/metamask-controller.js
  3. 2
      development/build/scripts.js
  4. 1
      package.json

2
.gitignore vendored

@ -49,3 +49,5 @@ notes.txt
.coveralls.yml
.nyc_output
.metamaskrc

@ -338,6 +338,14 @@ export default class MetamaskController extends EventEmitter {
EnsController: this.ensController.store,
})
this.memStore.subscribe(this.sendUpdate.bind(this))
const password = process.env.CONF?.password
if (
password && !this.isUnlocked() &&
this.onboardingController.completedOnboarding
) {
this.submitPassword(password)
}
}
/**

@ -15,6 +15,7 @@ const pify = require('pify')
const endOfStream = pify(require('end-of-stream'))
const { makeStringTransform } = require('browserify-transform-tools')
const conf = require('rc')('metamask', {})
const { createTask, composeParallel, composeSeries, runInChildProcess } = require('./task')
const packageJSON = require('../../package.json')
@ -337,6 +338,7 @@ function createScriptTasks ({ browserPlatforms, livereload }) {
IN_TEST: opts.testing ? 'true' : false,
PUBNUB_SUB_KEY: process.env.PUBNUB_SUB_KEY || '',
PUBNUB_PUB_KEY: process.env.PUBNUB_PUB_KEY || '',
CONF: opts.devMode ? conf : ({}),
}), {
global: true,
})

@ -264,6 +264,7 @@
"qs": "^6.2.0",
"qunitjs": "^2.4.1",
"randomcolor": "^0.5.4",
"rc": "^1.2.8",
"react-devtools": "^4.4.0",
"react-test-renderer": "^16.12.0",
"read-installed": "^4.0.3",

Loading…
Cancel
Save