1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

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>
This commit is contained in:
ricky 2020-05-15 15:40:06 -04:00 committed by GitHub
parent d488c16df5
commit c413d0905f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 0 deletions

2
.gitignore vendored
View File

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

View File

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

View File

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

View File

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