Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS_FALLBACK_LIST #28337

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/scripts/lib/ppom/ppom-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SignatureController } from '@metamask/signature-controller';
import {
BlockaidReason,
BlockaidResultType,
SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS,
SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS_FALLBACK_LIST,
SecurityAlertSource,
} from '../../../../shared/constants/security-provider';
import { SIGNING_METHODS } from '../../../../shared/constants/transaction';
Expand Down Expand Up @@ -123,7 +123,7 @@ export function handlePPOMError(
}

export async function isChainSupported(chainId: Hex): Promise<boolean> {
let supportedChainIds = SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS;
let supportedChainIds = SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS_FALLBACK_LIST;

try {
if (isSecurityAlertsAPIEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion shared/constants/security-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const FALSE_POSITIVE_REPORT_BASE_URL =

export const SECURITY_PROVIDER_UTM_SOURCE = 'metamask-ppom';

export const SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS: Hex[] = [
export const SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS_FALLBACK_LIST: Hex[] = [
CHAIN_IDS.ARBITRUM,
CHAIN_IDS.AVALANCHE,
CHAIN_IDS.BASE,
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/mock-e2e.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require('fs');

const {
SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS,
SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS_FALLBACK_LIST,
} = require('../../shared/constants/security-provider');
const {
BRIDGE_DEV_API_BASE_URL,
Expand Down Expand Up @@ -160,7 +160,7 @@ async function setupMocking(
.thenCallback(() => {
return {
statusCode: 200,
json: SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS,
json: SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS_FALLBACK_LIST,
};
});

Expand Down