From 156d7f947aefc28ed1c2906edb5183dee387c43e Mon Sep 17 00:00:00 2001 From: Baptiste Marchand <75846779+baptiste-marchand@users.noreply.github.com> Date: Wed, 4 Feb 2026 18:47:02 +0100 Subject: [PATCH 1/6] feat: move Notifications networks config to backend --- .../mocks/mock-raw-notifications.ts | 16 ++++ .../notification-api/notification-api.ts | 2 + .../types/notification-api/schema.ts | 23 ++++++ .../ui/constants.ts | 81 +------------------ .../utils/get-notification-message.ts | 24 +----- 5 files changed, 46 insertions(+), 100 deletions(-) diff --git a/packages/notification-services-controller/src/NotificationServicesController/mocks/mock-raw-notifications.ts b/packages/notification-services-controller/src/NotificationServicesController/mocks/mock-raw-notifications.ts index 89095c29884..5edbee29bd8 100644 --- a/packages/notification-services-controller/src/NotificationServicesController/mocks/mock-raw-notifications.ts +++ b/packages/notification-services-controller/src/NotificationServicesController/mocks/mock-raw-notifications.ts @@ -20,6 +20,14 @@ export function createMockNotificationEthSent(): NormalisedAPINotification { tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6', address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'eth_sent', network_fee: { @@ -58,6 +66,14 @@ export function createMockNotificationEthReceived(): NormalisedAPINotification { tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6', address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'eth_received', network_fee: { diff --git a/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/notification-api.ts b/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/notification-api.ts index 5a366061031..4c1e3747f23 100644 --- a/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/notification-api.ts +++ b/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/notification-api.ts @@ -24,6 +24,8 @@ export type Data_ERC20Sent = components['schemas']['Data_ERC20Sent']; export type Data_ERC20Received = components['schemas']['Data_ERC20Received']; export type Data_ERC721Sent = components['schemas']['Data_ERC721Sent']; export type Data_ERC721Received = components['schemas']['Data_ERC721Received']; +export type NetworkMetadata = components['schemas']['NetworkMetadata']; +export type BlockExplorer = components['schemas']['BlockExplorer']; type Notification = components['schemas']['NotificationOutputV3'][number]; type PlatformNotification = Extract< diff --git a/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/schema.ts b/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/schema.ts index ef3b5ea78f1..ef48b1bf4bf 100644 --- a/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/schema.ts +++ b/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/schema.ts @@ -170,6 +170,7 @@ export type components = { /** @example 0x881D40237659C251811CEC9c364ef91dC08D300C */ tx_hash: string; address: string; + network?: components['schemas']['NetworkMetadata']; data?: | components['schemas']['Data_MetamaskSwapCompleted'] | components['schemas']['Data_LidoStakeReadyToBeWithdrawn'] @@ -376,6 +377,28 @@ export type components = { /** Format: decimal */ usd: string; }; + BlockExplorer: { + /** + * Format: uri + * @example https://etherscan.io + */ + url: string; + /** @example Etherscan */ + name: string; + }; + NetworkMetadata: { + /** + * @description Human-readable network name + * @example Ethereum + */ + name: string; + /** + * @description Native token symbol + * @example ETH + */ + native_symbol: string; + block_explorer: components['schemas']['BlockExplorer']; + }; }; responses: never; parameters: never; diff --git a/packages/notification-services-controller/src/NotificationServicesController/ui/constants.ts b/packages/notification-services-controller/src/NotificationServicesController/ui/constants.ts index f49448bd36b..34f71801d8b 100644 --- a/packages/notification-services-controller/src/NotificationServicesController/ui/constants.ts +++ b/packages/notification-services-controller/src/NotificationServicesController/ui/constants.ts @@ -1,80 +1,3 @@ -import { NOTIFICATION_CHAINS_ID } from '../constants/notification-schema'; -import type { NOTIFICATION_CHAINS_IDS } from '../constants/notification-schema'; - -export const NOTIFICATION_NETWORK_CURRENCY_NAME = { - [NOTIFICATION_CHAINS_ID.ETHEREUM]: 'Ethereum', - [NOTIFICATION_CHAINS_ID.ARBITRUM]: 'Arbitrum', - [NOTIFICATION_CHAINS_ID.AVALANCHE]: 'Avalanche', - [NOTIFICATION_CHAINS_ID.BSC]: 'Binance', - [NOTIFICATION_CHAINS_ID.BASE]: 'Base', - [NOTIFICATION_CHAINS_ID.LINEA]: 'Linea', - [NOTIFICATION_CHAINS_ID.OPTIMISM]: 'Optimism', - [NOTIFICATION_CHAINS_ID.POLYGON]: 'Polygon', - [NOTIFICATION_CHAINS_ID.SEI]: 'Sei Network', -} satisfies Record; - -export const NOTIFICATION_NETWORK_CURRENCY_SYMBOL = { - [NOTIFICATION_CHAINS_ID.ETHEREUM]: 'ETH', - [NOTIFICATION_CHAINS_ID.ARBITRUM]: 'ETH', - [NOTIFICATION_CHAINS_ID.AVALANCHE]: 'AVAX', - [NOTIFICATION_CHAINS_ID.BSC]: 'BNB', - [NOTIFICATION_CHAINS_ID.BASE]: 'ETH', - [NOTIFICATION_CHAINS_ID.LINEA]: 'ETH', - [NOTIFICATION_CHAINS_ID.OPTIMISM]: 'ETH', - [NOTIFICATION_CHAINS_ID.POLYGON]: 'POL', - [NOTIFICATION_CHAINS_ID.SEI]: 'SEI', -} satisfies Record; - -export type BlockExplorerConfig = { - url: string; - name: string; -}; - -export const SUPPORTED_NOTIFICATION_BLOCK_EXPLORERS = { - // ETHEREUM - [NOTIFICATION_CHAINS_ID.ETHEREUM]: { - url: 'https://etherscan.io', - name: 'Etherscan', - }, - // OPTIMISM - [NOTIFICATION_CHAINS_ID.OPTIMISM]: { - url: 'https://optimistic.etherscan.io', - name: 'Optimistic Etherscan', - }, - // BSC - [NOTIFICATION_CHAINS_ID.BSC]: { - url: 'https://bscscan.com', - name: 'BscScan', - }, - // BASE - [NOTIFICATION_CHAINS_ID.BASE]: { - url: 'https://basescan.org', - name: 'BaseScan', - }, - // POLYGON - [NOTIFICATION_CHAINS_ID.POLYGON]: { - url: 'https://polygonscan.com', - name: 'PolygonScan', - }, - // ARBITRUM - [NOTIFICATION_CHAINS_ID.ARBITRUM]: { - url: 'https://arbiscan.io', - name: 'Arbiscan', - }, - // AVALANCHE - [NOTIFICATION_CHAINS_ID.AVALANCHE]: { - url: 'https://snowtrace.io', - name: 'Snowtrace', - }, - // LINEA - [NOTIFICATION_CHAINS_ID.LINEA]: { - url: 'https://lineascan.build', - name: 'LineaScan', - }, - [NOTIFICATION_CHAINS_ID.SEI]: { - url: 'https://seitrace.com/', - name: 'SeiTrace', - }, -} satisfies Record; - export { NOTIFICATION_CHAINS_ID } from '../constants/notification-schema'; +export type { NOTIFICATION_CHAINS_IDS } from '../constants/notification-schema'; +export type { NetworkMetadata, BlockExplorer } from '../types/notification-api'; diff --git a/packages/notification-services-controller/src/NotificationServicesPushController/utils/get-notification-message.ts b/packages/notification-services-controller/src/NotificationServicesPushController/utils/get-notification-message.ts index d6b107f86df..650f84bfaab 100644 --- a/packages/notification-services-controller/src/NotificationServicesPushController/utils/get-notification-message.ts +++ b/packages/notification-services-controller/src/NotificationServicesPushController/utils/get-notification-message.ts @@ -1,10 +1,6 @@ import { getAmount, formatAmount } from './get-notification-data'; -import type { - NOTIFICATION_CHAINS_IDS, - Types, -} from '../../NotificationServicesController'; +import type { Types } from '../../NotificationServicesController'; import type { Constants } from '../../NotificationServicesController'; -import { NOTIFICATION_NETWORK_CURRENCY_SYMBOL } from '../../NotificationServicesController/ui'; export type TranslationKeys = { pushPlatformNotificationsFundsSentTitle: () => string; @@ -108,7 +104,7 @@ export const createOnChainPushNotificationMessages = ( defaultDescription: (): string | null => translate('pushPlatformNotificationsFundsSentDescriptionDefault'), getDescription: (notification): string | null => { - const symbol = getChainSymbol(notification?.payload?.chain_id); + const symbol = notification?.payload?.network?.native_symbol; const tokenAmount = notification?.payload?.data?.amount?.eth; if (!symbol || !tokenAmount) { return null; @@ -153,7 +149,7 @@ export const createOnChainPushNotificationMessages = ( defaultDescription: (): string | null => translate('pushPlatformNotificationsFundsReceivedDescriptionDefault'), getDescription: (notification): string | null => { - const symbol = getChainSymbol(notification?.payload?.chain_id); + const symbol = notification?.payload?.network?.native_symbol; const tokenAmount = notification?.payload?.data?.amount?.eth; if (!symbol || !tokenAmount) { return null; @@ -267,20 +263,6 @@ export const createOnChainPushNotificationMessages = ( }; }; -/** - * Retrieves the symbol associated with a given chain ID. - * - * @param chainId - The ID of the chain. - * @returns The symbol associated with the chain ID, or null if not found. - */ -function getChainSymbol(chainId: number): string | null { - return ( - NOTIFICATION_NETWORK_CURRENCY_SYMBOL[ - chainId.toString() as NOTIFICATION_CHAINS_IDS - ] ?? null - ); -} - /** * Creates a push notification message based on the given on-chain raw notification. * From 6e7ebdb3c71651169370ba514932887a13a2e210 Mon Sep 17 00:00:00 2001 From: Baptiste Marchand <75846779+baptiste-marchand@users.noreply.github.com> Date: Thu, 5 Feb 2026 13:44:41 +0100 Subject: [PATCH 2/6] refactor: remove /notification-services/ui --- .../notification-services/ui/package.json | 9 --------- packages/notification-services-controller/package.json | 10 ---------- .../src/NotificationServicesController/index.ts | 1 - .../src/NotificationServicesController/ui/constants.ts | 3 --- .../src/NotificationServicesController/ui/index.ts | 1 - 5 files changed, 24 deletions(-) delete mode 100644 packages/notification-services-controller/notification-services/ui/package.json delete mode 100644 packages/notification-services-controller/src/NotificationServicesController/ui/constants.ts delete mode 100644 packages/notification-services-controller/src/NotificationServicesController/ui/index.ts diff --git a/packages/notification-services-controller/notification-services/ui/package.json b/packages/notification-services-controller/notification-services/ui/package.json deleted file mode 100644 index 75d655f391f..00000000000 --- a/packages/notification-services-controller/notification-services/ui/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "version": "1.0.0", - "private": true, - "description": "", - "license": "MIT", - "sideEffects": false, - "main": "../../dist/NotificationServicesController/ui/index.cjs", - "types": "../../dist/NotificationServicesController/ui/index.d.cts" -} diff --git a/packages/notification-services-controller/package.json b/packages/notification-services-controller/package.json index 44b7c188d3f..84c1b356b10 100644 --- a/packages/notification-services-controller/package.json +++ b/packages/notification-services-controller/package.json @@ -37,16 +37,6 @@ "default": "./dist/NotificationServicesController/index.cjs" } }, - "./notification-services/ui": { - "import": { - "types": "./dist/NotificationServicesController/ui/index.d.mts", - "default": "./dist/NotificationServicesController/ui/index.mjs" - }, - "require": { - "types": "./dist/NotificationServicesController/ui/index.d.cts", - "default": "./dist/NotificationServicesController/ui/index.cjs" - } - }, "./notification-services/mocks": { "import": { "types": "./dist/NotificationServicesController/mocks/index.d.mts", diff --git a/packages/notification-services-controller/src/NotificationServicesController/index.ts b/packages/notification-services-controller/src/NotificationServicesController/index.ts index a85278e58a5..cccbfb61498 100644 --- a/packages/notification-services-controller/src/NotificationServicesController/index.ts +++ b/packages/notification-services-controller/src/NotificationServicesController/index.ts @@ -11,6 +11,5 @@ export * from './processors'; export * as Constants from './constants'; export * from './constants'; export * as Mocks from './mocks'; -export * as UI from './ui'; export * from '../shared'; export { isVersionInBounds } from './utils/isVersionInBounds'; diff --git a/packages/notification-services-controller/src/NotificationServicesController/ui/constants.ts b/packages/notification-services-controller/src/NotificationServicesController/ui/constants.ts deleted file mode 100644 index 34f71801d8b..00000000000 --- a/packages/notification-services-controller/src/NotificationServicesController/ui/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { NOTIFICATION_CHAINS_ID } from '../constants/notification-schema'; -export type { NOTIFICATION_CHAINS_IDS } from '../constants/notification-schema'; -export type { NetworkMetadata, BlockExplorer } from '../types/notification-api'; diff --git a/packages/notification-services-controller/src/NotificationServicesController/ui/index.ts b/packages/notification-services-controller/src/NotificationServicesController/ui/index.ts deleted file mode 100644 index c94f80f843a..00000000000 --- a/packages/notification-services-controller/src/NotificationServicesController/ui/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './constants'; From 50eb91be2ab36b87427b0d9eb813011c6adbc582 Mon Sep 17 00:00:00 2001 From: Baptiste Marchand <75846779+baptiste-marchand@users.noreply.github.com> Date: Thu, 5 Feb 2026 13:44:53 +0100 Subject: [PATCH 3/6] refactor: remove deprecated notification chains ID constants from notification schema --- .../constants/notification-schema.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/packages/notification-services-controller/src/NotificationServicesController/constants/notification-schema.ts b/packages/notification-services-controller/src/NotificationServicesController/constants/notification-schema.ts index 256ac2dde93..12644d658b7 100644 --- a/packages/notification-services-controller/src/NotificationServicesController/constants/notification-schema.ts +++ b/packages/notification-services-controller/src/NotificationServicesController/constants/notification-schema.ts @@ -40,20 +40,3 @@ export const NOTIFICATION_API_TRIGGER_TYPES_SET: Set = new Set([ TRIGGER_TYPES.ERC1155_RECEIVED, TRIGGER_TYPES.PLATFORM, ]); - -export const NOTIFICATION_CHAINS_ID = { - ETHEREUM: '1', - OPTIMISM: '10', - BSC: '56', - BASE: '8453', - POLYGON: '137', - ARBITRUM: '42161', - AVALANCHE: '43114', - LINEA: '59144', - SEI: '1329', -} as const; - -// Kept as SCREAMING_SNAKE_CASE for backwards compatibility -// eslint-disable-next-line @typescript-eslint/naming-convention -export type NOTIFICATION_CHAINS_IDS = - (typeof NOTIFICATION_CHAINS_ID)[keyof typeof NOTIFICATION_CHAINS_ID]; From 02e304df623c8e9c47d21af190e61b33cb1e2eb7 Mon Sep 17 00:00:00 2001 From: Baptiste Marchand <75846779+baptiste-marchand@users.noreply.github.com> Date: Fri, 6 Feb 2026 11:51:12 +0100 Subject: [PATCH 4/6] test: add missing networks metadata in mocks --- .../mocks/mock-raw-notifications.ts | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/packages/notification-services-controller/src/NotificationServicesController/mocks/mock-raw-notifications.ts b/packages/notification-services-controller/src/NotificationServicesController/mocks/mock-raw-notifications.ts index 5edbee29bd8..68e57b71c32 100644 --- a/packages/notification-services-controller/src/NotificationServicesController/mocks/mock-raw-notifications.ts +++ b/packages/notification-services-controller/src/NotificationServicesController/mocks/mock-raw-notifications.ts @@ -112,6 +112,14 @@ export function createMockNotificationERC20Sent(): NormalisedAPINotification { tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6', address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'erc20_sent', network_fee: { @@ -156,6 +164,14 @@ export function createMockNotificationERC20Received(): NormalisedAPINotification tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6', address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'erc20_received', network_fee: { @@ -198,6 +214,14 @@ export function createMockNotificationERC721Sent(): NormalisedAPINotification { block_timestamp: '1700043467', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { to: '0xf47f628fe3bd2595e9ab384bfffc3859b448e451', nft: { @@ -245,6 +269,14 @@ export function createMockNotificationERC721Received(): NormalisedAPINotificatio block_timestamp: '1699980623', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { to: '0xba7f3daa8adfdad686574406ab9bd5d2f0a49d2e', nft: { @@ -292,6 +324,14 @@ export function createMockNotificationERC1155Sent(): NormalisedAPINotification { block_timestamp: '1700510003', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190', nft: { @@ -339,6 +379,14 @@ export function createMockNotificationERC1155Received(): NormalisedAPINotificati block_timestamp: '1700510003', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190', nft: { @@ -386,6 +434,14 @@ export function createMockNotificationMetaMaskSwapsCompleted(): NormalisedAPINot block_timestamp: '1697637275', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'metamask_swap_completed', rate: '1558.27', @@ -439,6 +495,14 @@ export function createMockNotificationRocketPoolStakeCompleted(): NormalisedAPIN block_timestamp: '1700145059', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'rocketpool_stake_completed', stake_in: { @@ -491,6 +555,14 @@ export function createMockNotificationRocketPoolUnStakeCompleted(): NormalisedAP block_timestamp: '1697718011', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'rocketpool_unstake_completed', stake_in: { @@ -543,6 +615,14 @@ export function createMockNotificationLidoStakeCompleted(): NormalisedAPINotific block_timestamp: '1698961091', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'lido_stake_completed', stake_in: { @@ -595,6 +675,14 @@ export function createMockNotificationLidoWithdrawalRequested(): NormalisedAPINo block_timestamp: '1697638415', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'lido_withdrawal_requested', stake_in: { @@ -647,6 +735,14 @@ export function createMockNotificationLidoWithdrawalCompleted(): NormalisedAPINo block_timestamp: '1697643851', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'lido_withdrawal_completed', stake_in: { @@ -699,6 +795,14 @@ export function createMockNotificationLidoReadyToBeWithdrawn(): NormalisedAPINot block_timestamp: '1697643851', chain_id: 1, address: '0x881D40237659C251811CEC9c364ef91dC08D300C', + network: { + name: 'Ethereum', + native_symbol: 'ETH', + block_explorer: { + url: 'https://etherscan.io', + name: 'Etherscan', + }, + }, data: { kind: 'lido_stake_ready_to_be_withdrawn', request_id: '123456789', From 83ee693f3d5d966cfa6f2a2e21a6593ed5c95f80 Mon Sep 17 00:00:00 2001 From: Baptiste Marchand <75846779+baptiste-marchand@users.noreply.github.com> Date: Fri, 6 Feb 2026 11:54:30 +0100 Subject: [PATCH 5/6] chore: update changelog --- packages/notification-services-controller/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/notification-services-controller/CHANGELOG.md b/packages/notification-services-controller/CHANGELOG.md index d2944744a4e..0b540b0f7ab 100644 --- a/packages/notification-services-controller/CHANGELOG.md +++ b/packages/notification-services-controller/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Note, however, that the versions specified in the client's `package.json` always "win", and you are expected to keep them up to date so as not to break controller and service intercommunication. - Modified background push utilities to handle more edgecases and not throw errors ([#7275](https://github.com/MetaMask/core/pull/7275)) - Bump `@metamask/controller-utils` from `^11.16.0` to `^11.18.0` ([#7534](https://github.com/MetaMask/core/pull/7534), [#7583](https://github.com/MetaMask/core/pull/7583)) +- Move Notifications networks metadata to backend ([#7840](https://github.com/MetaMask/core/pull/7840)) ### Fixed From 6e0eab7cc6abe42d525126b454b69ff6dbf43c33 Mon Sep 17 00:00:00 2001 From: Baptiste Marchand <75846779+baptiste-marchand@users.noreply.github.com> Date: Mon, 9 Feb 2026 10:56:46 +0100 Subject: [PATCH 6/6] fix: change network property to required in notification API schema --- .../types/notification-api/schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/schema.ts b/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/schema.ts index ef48b1bf4bf..84c085a9d5f 100644 --- a/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/schema.ts +++ b/packages/notification-services-controller/src/NotificationServicesController/types/notification-api/schema.ts @@ -170,7 +170,7 @@ export type components = { /** @example 0x881D40237659C251811CEC9c364ef91dC08D300C */ tx_hash: string; address: string; - network?: components['schemas']['NetworkMetadata']; + network: components['schemas']['NetworkMetadata']; data?: | components['schemas']['Data_MetamaskSwapCompleted'] | components['schemas']['Data_LidoStakeReadyToBeWithdrawn']