1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00

Use current version of the phishing warning page (#16123)

We now use the `latest` tag for the phishing warning page, we now use
the version that matches what we have in our manifest. This ensures
that our phishing warning e2e tests match the behaviour of the
production build, and it ensures that breaking changes to the phishing
warning page don't impact users in production.
This commit is contained in:
Mark Stacey 2022-10-07 12:49:20 -04:00 committed by GitHub
parent e72dfad21a
commit 7279ea5b40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,7 @@ const bifyModuleGroups = require('bify-module-groups');
const { streamFlatMap } = require('../stream-flat-map'); const { streamFlatMap } = require('../stream-flat-map');
const { BuildType } = require('../lib/build-type'); const { BuildType } = require('../lib/build-type');
const { generateIconNames } = require('../generate-icon-names'); const { generateIconNames } = require('../generate-icon-names');
const phishingWarningManifest = require('../../node_modules/@metamask/phishing-warning/package.json');
const { BUILD_TARGETS, ENVIRONMENT } = require('./constants'); const { BUILD_TARGETS, ENVIRONMENT } = require('./constants');
const { getConfig, getProductionConfig } = require('./config'); const { getConfig, getProductionConfig } = require('./config');
const { const {
@ -112,7 +113,7 @@ function getPhishingWarningPageUrl({ config, testing }) {
if (!phishingWarningPageUrl) { if (!phishingWarningPageUrl) {
phishingWarningPageUrl = testing phishingWarningPageUrl = testing
? 'http://localhost:9999/' ? 'http://localhost:9999/'
: 'https://metamask.github.io/phishing-warning/latest/'; : `https://metamask.github.io/phishing-warning/v${phishingWarningManifest.version}/`;
} }
// We add a hash/fragment to the URL dynamically, so we need to ensure it // We add a hash/fragment to the URL dynamically, so we need to ensure it