1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-17 23:13:21 +01:00
metamask-extension/app/scripts/first-time-state.js

25 lines
613 B
JavaScript
Raw Normal View History

2017-03-14 05:14:19 +01:00
// test and development environment variables
const env = process.env.METAMASK_ENV
const METAMASK_DEBUG = process.env.METAMASK_DEBUG
2018-04-12 23:17:36 +02:00
const { DEFAULT_NETWORK, MAINNET } = require('./controllers/network/enums')
2017-03-14 05:14:19 +01:00
/**
* @typedef {Object} FirstTimeState
* @property {Object} config Initial configuration parameters
* @property {Object} NetworkController Network controller state
*/
/**
2018-04-18 23:24:36 +02:00
* @type {FirstTimeState}
*/
const initialState = {
2017-05-23 08:12:28 +02:00
config: {},
NetworkController: {
provider: {
2018-04-12 23:17:36 +02:00
type: (METAMASK_DEBUG || env === 'test') ? DEFAULT_NETWORK : MAINNET,
},
},
2017-03-14 05:14:19 +01:00
}
module.exports = initialState