Fix environment variable inlining (#9517)

feature/default_network_editable
Whymarrh Whitby 4 years ago committed by GitHub
parent 25e5ac24b2
commit 4411f0eb9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/scripts/controllers/network/network.js
  2. 6
      app/scripts/lib/setupSentry.js

@ -21,7 +21,6 @@ import {
} from './enums'
const env = process.env.METAMASK_ENV
const { METAMASK_DEBUG } = process.env
let defaultProviderConfigType
let defaultProviderChainId
@ -29,7 +28,7 @@ if (process.env.IN_TEST === 'true') {
defaultProviderConfigType = LOCALHOST
// Decimal 5777, an arbitrary chain ID we use for testing
defaultProviderChainId = '0x1691'
} else if (METAMASK_DEBUG || env === 'test') {
} else if (process.env.METAMASK_DEBUG || env === 'test') {
defaultProviderConfigType = RINKEBY
} else {
defaultProviderConfigType = MAINNET

@ -3,7 +3,11 @@ import { Dedupe, ExtraErrorData } from '@sentry/integrations'
import extractEthjsErrorMessage from './extractEthjsErrorMessage'
const { METAMASK_DEBUG, METAMASK_ENVIRONMENT } = process.env
/* eslint-disable prefer-destructuring */
// Destructuring breaks the inlining of the environment variables
const METAMASK_DEBUG = process.env.METAMASK_DEBUG
const METAMASK_ENVIRONMENT = process.env.METAMASK_ENVIRONMENT
/* eslint-enable prefer-destructuring */
const SENTRY_DSN_DEV = 'https://f59f3dd640d2429d9d0e2445a87ea8e1@sentry.io/273496'
// This describes the subset of Redux state attached to errors sent to Sentry

Loading…
Cancel
Save