Fix portfolio URL configuration (#15849)

The portfolio URL added in #15407 was meant to be configurable via
environment variable or the `.metamaskrc` file, but that configuration
was broken. Instead the default value was always used.

That configuration has been fixed. The portfolio URL can be set either
by environment variable or configuration file.
feature/default_network_editable
Mark Stacey 2 years ago committed by GitHub
parent 929a1a0d52
commit 5bfc2f379d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      development/build/config.js
  2. 2
      development/build/scripts.js

@ -25,6 +25,7 @@ async function getConfig() {
INFURA_PROJECT_ID: process.env.INFURA_PROJECT_ID,
ONBOARDING_V2: process.env.ONBOARDING_V2,
PHISHING_WARNING_PAGE_URL: process.env.PHISHING_WARNING_PAGE_URL,
PORTFOLIO_URL: process.env.PORTFOLIO_URL,
PUBNUB_PUB_KEY: process.env.PUBNUB_PUB_KEY,
PUBNUB_SUB_KEY: process.env.PUBNUB_SUB_KEY,
SEGMENT_HOST: process.env.SEGMENT_HOST,

@ -1023,7 +1023,6 @@ async function getEnvironmentVariables({ buildTarget, buildType, version }) {
environment,
testing,
}),
PORTFOLIO_URL: ENVIRONMENT.PORTFOLIO_URL || 'https://portfolio.metamask.io',
METAMASK_DEBUG: devMode,
METAMASK_ENVIRONMENT: environment,
METAMASK_VERSION: version,
@ -1031,6 +1030,7 @@ async function getEnvironmentVariables({ buildTarget, buildType, version }) {
NODE_ENV: devMode ? ENVIRONMENT.DEVELOPMENT : ENVIRONMENT.PRODUCTION,
ONBOARDING_V2: config.ONBOARDING_V2 === '1',
PHISHING_WARNING_PAGE_URL: getPhishingWarningPageUrl({ config, testing }),
PORTFOLIO_URL: config.PORTFOLIO_URL || 'https://portfolio.metamask.io',
PUBNUB_PUB_KEY: config.PUBNUB_PUB_KEY || '',
PUBNUB_SUB_KEY: config.PUBNUB_SUB_KEY || '',
SEGMENT_HOST: config.SEGMENT_HOST,

Loading…
Cancel
Save