@metamask/notification-services-controller 21.0.0 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -1
- package/dist/NotificationServicesController/NotificationServicesController.cjs +56 -42
- package/dist/NotificationServicesController/NotificationServicesController.cjs.map +1 -1
- package/dist/NotificationServicesController/NotificationServicesController.d.cts +3 -2
- package/dist/NotificationServicesController/NotificationServicesController.d.cts.map +1 -1
- package/dist/NotificationServicesController/NotificationServicesController.d.mts +3 -2
- package/dist/NotificationServicesController/NotificationServicesController.d.mts.map +1 -1
- package/dist/NotificationServicesController/NotificationServicesController.mjs +56 -41
- package/dist/NotificationServicesController/NotificationServicesController.mjs.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.cjs +4 -12
- package/dist/NotificationServicesController/constants/notification-schema.cjs.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.d.cts +0 -12
- package/dist/NotificationServicesController/constants/notification-schema.d.cts.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.d.mts +0 -12
- package/dist/NotificationServicesController/constants/notification-schema.d.mts.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.mjs +3 -11
- package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -1
- package/dist/NotificationServicesController/index.cjs +1 -2
- package/dist/NotificationServicesController/index.cjs.map +1 -1
- package/dist/NotificationServicesController/index.d.cts +0 -1
- package/dist/NotificationServicesController/index.d.cts.map +1 -1
- package/dist/NotificationServicesController/index.d.mts +0 -1
- package/dist/NotificationServicesController/index.d.mts.map +1 -1
- package/dist/NotificationServicesController/index.mjs +0 -1
- package/dist/NotificationServicesController/index.mjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.cjs +2 -2
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.cjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.d.cts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.d.mts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.mjs +2 -2
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.mjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs +120 -0
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs +120 -0
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.cjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.d.cts +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.d.cts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.d.mts +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.d.mts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.mjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mockResponses.cjs +6 -0
- package/dist/NotificationServicesController/mocks/mockResponses.cjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mockResponses.d.cts.map +1 -1
- package/dist/NotificationServicesController/mocks/mockResponses.d.mts.map +1 -1
- package/dist/NotificationServicesController/mocks/mockResponses.mjs +6 -0
- package/dist/NotificationServicesController/mocks/mockResponses.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.cjs +11 -9
- package/dist/NotificationServicesController/processors/process-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.d.cts +1 -563
- package/dist/NotificationServicesController/processors/process-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.d.mts +1 -563
- package/dist/NotificationServicesController/processors/process-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.mjs +11 -9
- package/dist/NotificationServicesController/processors/process-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.d.cts +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.d.mts +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/services/api-notifications.cjs +21 -21
- package/dist/NotificationServicesController/services/api-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/services/api-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/services/api-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/services/api-notifications.mjs +21 -21
- package/dist/NotificationServicesController/services/api-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.cjs +19 -10
- package/dist/NotificationServicesController/services/feature-announcements.cjs.map +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.d.cts.map +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.d.mts.map +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.mjs +19 -10
- package/dist/NotificationServicesController/services/feature-announcements.mjs.map +1 -1
- package/dist/NotificationServicesController/services/notification-config-cache.cjs +4 -4
- package/dist/NotificationServicesController/services/notification-config-cache.cjs.map +1 -1
- package/dist/NotificationServicesController/services/notification-config-cache.mjs +4 -4
- package/dist/NotificationServicesController/services/notification-config-cache.mjs.map +1 -1
- package/dist/NotificationServicesController/services/perp-notifications.cjs +2 -2
- package/dist/NotificationServicesController/services/perp-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/services/perp-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/services/perp-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/services/perp-notifications.mjs +2 -2
- package/dist/NotificationServicesController/services/perp-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/notification-api.cjs.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts +2 -0
- package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts +2 -0
- package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/notification-api.mjs.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/schema.cjs +2 -0
- package/dist/NotificationServicesController/types/notification-api/schema.cjs.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/schema.d.cts +23 -0
- package/dist/NotificationServicesController/types/notification-api/schema.d.cts.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/schema.d.mts +23 -0
- package/dist/NotificationServicesController/types/notification-api/schema.d.mts.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/schema.mjs +2 -0
- package/dist/NotificationServicesController/types/notification-api/schema.mjs.map +1 -1
- package/dist/NotificationServicesController/types/perps/schema.cjs +2 -0
- package/dist/NotificationServicesController/types/perps/schema.cjs.map +1 -1
- package/dist/NotificationServicesController/types/perps/schema.d.cts.map +1 -1
- package/dist/NotificationServicesController/types/perps/schema.d.mts.map +1 -1
- package/dist/NotificationServicesController/types/perps/schema.mjs +2 -0
- package/dist/NotificationServicesController/types/perps/schema.mjs.map +1 -1
- package/dist/NotificationServicesController/utils/isVersionInBounds.cjs.map +1 -1
- package/dist/NotificationServicesController/utils/isVersionInBounds.d.cts.map +1 -1
- package/dist/NotificationServicesController/utils/isVersionInBounds.d.mts.map +1 -1
- package/dist/NotificationServicesController/utils/isVersionInBounds.mjs.map +1 -1
- package/dist/NotificationServicesController/utils/should-auto-expire.cjs.map +1 -1
- package/dist/NotificationServicesController/utils/should-auto-expire.d.cts.map +1 -1
- package/dist/NotificationServicesController/utils/should-auto-expire.d.mts.map +1 -1
- package/dist/NotificationServicesController/utils/should-auto-expire.mjs.map +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs +0 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs.map +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +0 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs.map +1 -1
- package/dist/NotificationServicesPushController/mocks/mockResponse.cjs.map +1 -1
- package/dist/NotificationServicesPushController/mocks/mockResponse.d.cts +9 -24
- package/dist/NotificationServicesPushController/mocks/mockResponse.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/mocks/mockResponse.d.mts +9 -24
- package/dist/NotificationServicesPushController/mocks/mockResponse.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/mocks/mockResponse.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.cjs.map +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/services.cjs.map +1 -1
- package/dist/NotificationServicesPushController/services/services.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/services/services.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/services/services.mjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.cjs +4 -4
- package/dist/NotificationServicesPushController/utils/get-notification-data.cjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.cts +2 -2
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.mts +2 -2
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs +4 -4
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.cjs +62 -71
- package/dist/NotificationServicesPushController/utils/get-notification-message.cjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts +9 -9
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts +9 -9
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +62 -71
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs.map +1 -1
- package/dist/NotificationServicesPushController/web/push-utils.cjs +15 -7
- package/dist/NotificationServicesPushController/web/push-utils.cjs.map +1 -1
- package/dist/NotificationServicesPushController/web/push-utils.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/web/push-utils.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/web/push-utils.mjs +16 -8
- package/dist/NotificationServicesPushController/web/push-utils.mjs.map +1 -1
- package/dist/shared/is-onchain-notification.cjs +3 -3
- package/dist/shared/is-onchain-notification.cjs.map +1 -1
- package/dist/shared/is-onchain-notification.d.cts +2 -2
- package/dist/shared/is-onchain-notification.d.cts.map +1 -1
- package/dist/shared/is-onchain-notification.d.mts +2 -2
- package/dist/shared/is-onchain-notification.d.mts.map +1 -1
- package/dist/shared/is-onchain-notification.mjs +3 -3
- package/dist/shared/is-onchain-notification.mjs.map +1 -1
- package/dist/shared/to-raw-notification.cjs.map +1 -1
- package/dist/shared/to-raw-notification.mjs.map +1 -1
- package/package.json +12 -25
- package/dist/NotificationServicesController/ui/constants.cjs +0 -75
- package/dist/NotificationServicesController/ui/constants.cjs.map +0 -1
- package/dist/NotificationServicesController/ui/constants.d.cts +0 -66
- package/dist/NotificationServicesController/ui/constants.d.cts.map +0 -1
- package/dist/NotificationServicesController/ui/constants.d.mts +0 -66
- package/dist/NotificationServicesController/ui/constants.d.mts.map +0 -1
- package/dist/NotificationServicesController/ui/constants.mjs +0 -71
- package/dist/NotificationServicesController/ui/constants.mjs.map +0 -1
- package/dist/NotificationServicesController/ui/index.cjs +0 -18
- package/dist/NotificationServicesController/ui/index.cjs.map +0 -1
- package/dist/NotificationServicesController/ui/index.d.cts +0 -2
- package/dist/NotificationServicesController/ui/index.d.cts.map +0 -1
- package/dist/NotificationServicesController/ui/index.d.mts +0 -2
- package/dist/NotificationServicesController/ui/index.d.mts.map +0 -1
- package/dist/NotificationServicesController/ui/index.mjs +0 -2
- package/dist/NotificationServicesController/ui/index.mjs.map +0 -1
- package/dist/NotificationServicesPushController/services/push/push-web.cjs +0 -145
- package/dist/NotificationServicesPushController/services/push/push-web.cjs.map +0 -1
- package/dist/NotificationServicesPushController/services/push/push-web.d.cts +0 -34
- package/dist/NotificationServicesPushController/services/push/push-web.d.cts.map +0 -1
- package/dist/NotificationServicesPushController/services/push/push-web.d.mts +0 -34
- package/dist/NotificationServicesPushController/services/push/push-web.d.mts.map +0 -1
- package/dist/NotificationServicesPushController/services/push/push-web.mjs +0 -142
- package/dist/NotificationServicesPushController/services/push/push-web.mjs.map +0 -1
- package/notification-services/ui/package.json +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-schema.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/constants/notification-schema.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAmBX;AAnBD,WAAY,aAAa;IACvB,gEAA+C,CAAA;IAC/C,oEAAmD,CAAA;IACnD,0CAAyB,CAAA;IACzB,kDAAiC,CAAA;IACjC,sCAAqB,CAAA;IACrB,8CAA6B,CAAA;IAC7B,0EAAyD,CAAA;IACzD,8EAA6D,CAAA;IAC7D,8DAA6C,CAAA;IAC7C,wEAAuD,CAAA;IACvD,wEAAuD,CAAA;IACvD,sFAAqE,CAAA;IACrE,4CAA2B,CAAA;IAC3B,oDAAmC,CAAA;IACnC,8CAA6B,CAAA;IAC7B,sDAAqC,CAAA;IACrC,8BAAa,CAAA;IACb,sCAAqB,CAAA;AACvB,CAAC,EAnBW,aAAa,6BAAb,aAAa,QAmBxB;
|
|
1
|
+
{"version":3,"file":"notification-schema.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/constants/notification-schema.ts"],"names":[],"mappings":";;;AAAA,8GAA8G;AAC9G,yDAAyD;AACzD,IAAY,aAmBX;AAnBD,WAAY,aAAa;IACvB,gEAA+C,CAAA;IAC/C,oEAAmD,CAAA;IACnD,0CAAyB,CAAA;IACzB,kDAAiC,CAAA;IACjC,sCAAqB,CAAA;IACrB,8CAA6B,CAAA;IAC7B,0EAAyD,CAAA;IACzD,8EAA6D,CAAA;IAC7D,8DAA6C,CAAA;IAC7C,wEAAuD,CAAA;IACvD,wEAAuD,CAAA;IACvD,sFAAqE,CAAA;IACrE,4CAA2B,CAAA;IAC3B,oDAAmC,CAAA;IACnC,8CAA6B,CAAA;IAC7B,sDAAqC,CAAA;IACrC,8BAAa,CAAA;IACb,sCAAqB,CAAA;AACvB,CAAC,EAnBW,aAAa,6BAAb,aAAa,QAmBxB;AACD,wDAAwD;AAE3C,QAAA,kCAAkC,GAAgB,IAAI,GAAG,CAAC;IACrE,aAAa,CAAC,uBAAuB;IACrC,aAAa,CAAC,UAAU;IACxB,aAAa,CAAC,cAAc;IAC5B,aAAa,CAAC,QAAQ;IACtB,aAAa,CAAC,YAAY;IAC1B,aAAa,CAAC,0BAA0B;IACxC,aAAa,CAAC,4BAA4B;IAC1C,aAAa,CAAC,oBAAoB;IAClC,aAAa,CAAC,yBAAyB;IACvC,aAAa,CAAC,yBAAyB;IACvC,aAAa,CAAC,gCAAgC;IAC9C,aAAa,CAAC,WAAW;IACzB,aAAa,CAAC,eAAe;IAC7B,aAAa,CAAC,YAAY;IAC1B,aAAa,CAAC,gBAAgB;IAC9B,aAAa,CAAC,QAAQ;CACvB,CAAC,CAAC","sourcesContent":["// Using SCREAMING_SNAKE_CASE for enum name and members to mirror snake_case API string values for readability\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum TRIGGER_TYPES {\n FEATURES_ANNOUNCEMENT = 'features_announcement',\n METAMASK_SWAP_COMPLETED = 'metamask_swap_completed',\n ERC20_SENT = 'erc20_sent',\n ERC20_RECEIVED = 'erc20_received',\n ETH_SENT = 'eth_sent',\n ETH_RECEIVED = 'eth_received',\n ROCKETPOOL_STAKE_COMPLETED = 'rocketpool_stake_completed',\n ROCKETPOOL_UNSTAKE_COMPLETED = 'rocketpool_unstake_completed',\n LIDO_STAKE_COMPLETED = 'lido_stake_completed',\n LIDO_WITHDRAWAL_REQUESTED = 'lido_withdrawal_requested',\n LIDO_WITHDRAWAL_COMPLETED = 'lido_withdrawal_completed',\n LIDO_STAKE_READY_TO_BE_WITHDRAWN = 'lido_stake_ready_to_be_withdrawn',\n ERC721_SENT = 'erc721_sent',\n ERC721_RECEIVED = 'erc721_received',\n ERC1155_SENT = 'erc1155_sent',\n ERC1155_RECEIVED = 'erc1155_received',\n SNAP = 'snap',\n PLATFORM = 'platform',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const NOTIFICATION_API_TRIGGER_TYPES_SET: Set<string> = new Set([\n TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,\n TRIGGER_TYPES.ERC20_SENT,\n TRIGGER_TYPES.ERC20_RECEIVED,\n TRIGGER_TYPES.ETH_SENT,\n TRIGGER_TYPES.ETH_RECEIVED,\n TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,\n TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,\n TRIGGER_TYPES.LIDO_STAKE_COMPLETED,\n TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,\n TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,\n TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN,\n TRIGGER_TYPES.ERC721_SENT,\n TRIGGER_TYPES.ERC721_RECEIVED,\n TRIGGER_TYPES.ERC1155_SENT,\n TRIGGER_TYPES.ERC1155_RECEIVED,\n TRIGGER_TYPES.PLATFORM,\n]);\n"]}
|
|
@@ -19,16 +19,4 @@ export declare enum TRIGGER_TYPES {
|
|
|
19
19
|
PLATFORM = "platform"
|
|
20
20
|
}
|
|
21
21
|
export declare const NOTIFICATION_API_TRIGGER_TYPES_SET: Set<string>;
|
|
22
|
-
export declare const NOTIFICATION_CHAINS_ID: {
|
|
23
|
-
readonly ETHEREUM: "1";
|
|
24
|
-
readonly OPTIMISM: "10";
|
|
25
|
-
readonly BSC: "56";
|
|
26
|
-
readonly BASE: "8453";
|
|
27
|
-
readonly POLYGON: "137";
|
|
28
|
-
readonly ARBITRUM: "42161";
|
|
29
|
-
readonly AVALANCHE: "43114";
|
|
30
|
-
readonly LINEA: "59144";
|
|
31
|
-
readonly SEI: "1329";
|
|
32
|
-
};
|
|
33
|
-
export type NOTIFICATION_CHAINS_IDS = (typeof NOTIFICATION_CHAINS_ID)[keyof typeof NOTIFICATION_CHAINS_ID];
|
|
34
22
|
//# sourceMappingURL=notification-schema.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-schema.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/constants/notification-schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notification-schema.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/constants/notification-schema.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa;IACvB,qBAAqB,0BAA0B;IAC/C,uBAAuB,4BAA4B;IACnD,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,0BAA0B,+BAA+B;IACzD,4BAA4B,iCAAiC;IAC7D,oBAAoB,yBAAyB;IAC7C,yBAAyB,8BAA8B;IACvD,yBAAyB,8BAA8B;IACvD,gCAAgC,qCAAqC;IACrE,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,gBAAgB,qBAAqB;IACrC,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAGD,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,MAAM,CAiBzD,CAAC"}
|
|
@@ -19,16 +19,4 @@ export declare enum TRIGGER_TYPES {
|
|
|
19
19
|
PLATFORM = "platform"
|
|
20
20
|
}
|
|
21
21
|
export declare const NOTIFICATION_API_TRIGGER_TYPES_SET: Set<string>;
|
|
22
|
-
export declare const NOTIFICATION_CHAINS_ID: {
|
|
23
|
-
readonly ETHEREUM: "1";
|
|
24
|
-
readonly OPTIMISM: "10";
|
|
25
|
-
readonly BSC: "56";
|
|
26
|
-
readonly BASE: "8453";
|
|
27
|
-
readonly POLYGON: "137";
|
|
28
|
-
readonly ARBITRUM: "42161";
|
|
29
|
-
readonly AVALANCHE: "43114";
|
|
30
|
-
readonly LINEA: "59144";
|
|
31
|
-
readonly SEI: "1329";
|
|
32
|
-
};
|
|
33
|
-
export type NOTIFICATION_CHAINS_IDS = (typeof NOTIFICATION_CHAINS_ID)[keyof typeof NOTIFICATION_CHAINS_ID];
|
|
34
22
|
//# sourceMappingURL=notification-schema.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-schema.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/constants/notification-schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notification-schema.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/constants/notification-schema.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa;IACvB,qBAAqB,0BAA0B;IAC/C,uBAAuB,4BAA4B;IACnD,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,0BAA0B,+BAA+B;IACzD,4BAA4B,iCAAiC;IAC7D,oBAAoB,yBAAyB;IAC7C,yBAAyB,8BAA8B;IACvD,yBAAyB,8BAA8B;IACvD,gCAAgC,qCAAqC;IACrE,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,gBAAgB,qBAAqB;IACrC,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAGD,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,MAAM,CAiBzD,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Using SCREAMING_SNAKE_CASE for enum name and members to mirror snake_case API string values for readability
|
|
2
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
1
3
|
export var TRIGGER_TYPES;
|
|
2
4
|
(function (TRIGGER_TYPES) {
|
|
3
5
|
TRIGGER_TYPES["FEATURES_ANNOUNCEMENT"] = "features_announcement";
|
|
@@ -19,6 +21,7 @@ export var TRIGGER_TYPES;
|
|
|
19
21
|
TRIGGER_TYPES["SNAP"] = "snap";
|
|
20
22
|
TRIGGER_TYPES["PLATFORM"] = "platform";
|
|
21
23
|
})(TRIGGER_TYPES || (TRIGGER_TYPES = {}));
|
|
24
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
22
25
|
export const NOTIFICATION_API_TRIGGER_TYPES_SET = new Set([
|
|
23
26
|
TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,
|
|
24
27
|
TRIGGER_TYPES.ERC20_SENT,
|
|
@@ -37,15 +40,4 @@ export const NOTIFICATION_API_TRIGGER_TYPES_SET = new Set([
|
|
|
37
40
|
TRIGGER_TYPES.ERC1155_RECEIVED,
|
|
38
41
|
TRIGGER_TYPES.PLATFORM,
|
|
39
42
|
]);
|
|
40
|
-
export const NOTIFICATION_CHAINS_ID = {
|
|
41
|
-
ETHEREUM: '1',
|
|
42
|
-
OPTIMISM: '10',
|
|
43
|
-
BSC: '56',
|
|
44
|
-
BASE: '8453',
|
|
45
|
-
POLYGON: '137',
|
|
46
|
-
ARBITRUM: '42161',
|
|
47
|
-
AVALANCHE: '43114',
|
|
48
|
-
LINEA: '59144',
|
|
49
|
-
SEI: '1329',
|
|
50
|
-
};
|
|
51
43
|
//# sourceMappingURL=notification-schema.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-schema.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/constants/notification-schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,aAmBX;AAnBD,WAAY,aAAa;IACvB,gEAA+C,CAAA;IAC/C,oEAAmD,CAAA;IACnD,0CAAyB,CAAA;IACzB,kDAAiC,CAAA;IACjC,sCAAqB,CAAA;IACrB,8CAA6B,CAAA;IAC7B,0EAAyD,CAAA;IACzD,8EAA6D,CAAA;IAC7D,8DAA6C,CAAA;IAC7C,wEAAuD,CAAA;IACvD,wEAAuD,CAAA;IACvD,sFAAqE,CAAA;IACrE,4CAA2B,CAAA;IAC3B,oDAAmC,CAAA;IACnC,8CAA6B,CAAA;IAC7B,sDAAqC,CAAA;IACrC,8BAAa,CAAA;IACb,sCAAqB,CAAA;AACvB,CAAC,EAnBW,aAAa,KAAb,aAAa,QAmBxB;
|
|
1
|
+
{"version":3,"file":"notification-schema.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/constants/notification-schema.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,yDAAyD;AACzD,MAAM,CAAN,IAAY,aAmBX;AAnBD,WAAY,aAAa;IACvB,gEAA+C,CAAA;IAC/C,oEAAmD,CAAA;IACnD,0CAAyB,CAAA;IACzB,kDAAiC,CAAA;IACjC,sCAAqB,CAAA;IACrB,8CAA6B,CAAA;IAC7B,0EAAyD,CAAA;IACzD,8EAA6D,CAAA;IAC7D,8DAA6C,CAAA;IAC7C,wEAAuD,CAAA;IACvD,wEAAuD,CAAA;IACvD,sFAAqE,CAAA;IACrE,4CAA2B,CAAA;IAC3B,oDAAmC,CAAA;IACnC,8CAA6B,CAAA;IAC7B,sDAAqC,CAAA;IACrC,8BAAa,CAAA;IACb,sCAAqB,CAAA;AACvB,CAAC,EAnBW,aAAa,KAAb,aAAa,QAmBxB;AACD,wDAAwD;AAExD,MAAM,CAAC,MAAM,kCAAkC,GAAgB,IAAI,GAAG,CAAC;IACrE,aAAa,CAAC,uBAAuB;IACrC,aAAa,CAAC,UAAU;IACxB,aAAa,CAAC,cAAc;IAC5B,aAAa,CAAC,QAAQ;IACtB,aAAa,CAAC,YAAY;IAC1B,aAAa,CAAC,0BAA0B;IACxC,aAAa,CAAC,4BAA4B;IAC1C,aAAa,CAAC,oBAAoB;IAClC,aAAa,CAAC,yBAAyB;IACvC,aAAa,CAAC,yBAAyB;IACvC,aAAa,CAAC,gCAAgC;IAC9C,aAAa,CAAC,WAAW;IACzB,aAAa,CAAC,eAAe;IAC7B,aAAa,CAAC,YAAY;IAC1B,aAAa,CAAC,gBAAgB;IAC9B,aAAa,CAAC,QAAQ;CACvB,CAAC,CAAC","sourcesContent":["// Using SCREAMING_SNAKE_CASE for enum name and members to mirror snake_case API string values for readability\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum TRIGGER_TYPES {\n FEATURES_ANNOUNCEMENT = 'features_announcement',\n METAMASK_SWAP_COMPLETED = 'metamask_swap_completed',\n ERC20_SENT = 'erc20_sent',\n ERC20_RECEIVED = 'erc20_received',\n ETH_SENT = 'eth_sent',\n ETH_RECEIVED = 'eth_received',\n ROCKETPOOL_STAKE_COMPLETED = 'rocketpool_stake_completed',\n ROCKETPOOL_UNSTAKE_COMPLETED = 'rocketpool_unstake_completed',\n LIDO_STAKE_COMPLETED = 'lido_stake_completed',\n LIDO_WITHDRAWAL_REQUESTED = 'lido_withdrawal_requested',\n LIDO_WITHDRAWAL_COMPLETED = 'lido_withdrawal_completed',\n LIDO_STAKE_READY_TO_BE_WITHDRAWN = 'lido_stake_ready_to_be_withdrawn',\n ERC721_SENT = 'erc721_sent',\n ERC721_RECEIVED = 'erc721_received',\n ERC1155_SENT = 'erc1155_sent',\n ERC1155_RECEIVED = 'erc1155_received',\n SNAP = 'snap',\n PLATFORM = 'platform',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const NOTIFICATION_API_TRIGGER_TYPES_SET: Set<string> = new Set([\n TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,\n TRIGGER_TYPES.ERC20_SENT,\n TRIGGER_TYPES.ERC20_RECEIVED,\n TRIGGER_TYPES.ETH_SENT,\n TRIGGER_TYPES.ETH_RECEIVED,\n TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,\n TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,\n TRIGGER_TYPES.LIDO_STAKE_COMPLETED,\n TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,\n TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,\n TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN,\n TRIGGER_TYPES.ERC721_SENT,\n TRIGGER_TYPES.ERC721_RECEIVED,\n TRIGGER_TYPES.ERC1155_SENT,\n TRIGGER_TYPES.ERC1155_RECEIVED,\n TRIGGER_TYPES.PLATFORM,\n]);\n"]}
|
|
@@ -29,7 +29,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
30
|
};
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.isVersionInBounds = exports.
|
|
32
|
+
exports.isVersionInBounds = exports.Mocks = exports.Constants = exports.Processors = exports.Controller = void 0;
|
|
33
33
|
const NotificationServicesController_1 = __importDefault(require("./NotificationServicesController.cjs"));
|
|
34
34
|
exports.Controller = NotificationServicesController_1.default;
|
|
35
35
|
const NotificationServicesController = NotificationServicesController_1.default;
|
|
@@ -40,7 +40,6 @@ __exportStar(require("./processors/index.cjs"), exports);
|
|
|
40
40
|
exports.Constants = __importStar(require("./constants/index.cjs"));
|
|
41
41
|
__exportStar(require("./constants/index.cjs"), exports);
|
|
42
42
|
exports.Mocks = __importStar(require("./mocks/index.cjs"));
|
|
43
|
-
exports.UI = __importStar(require("./ui/index.cjs"));
|
|
44
43
|
__exportStar(require("../shared/index.cjs"), exports);
|
|
45
44
|
var isVersionInBounds_1 = require("./utils/isVersionInBounds.cjs");
|
|
46
45
|
Object.defineProperty(exports, "isVersionInBounds", { enumerable: true, get: function () { return isVersionInBounds_1.isVersionInBounds; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/NotificationServicesController/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0GAA0D;AAGjD,qBAHF,wCAAU,CAGE;AADnB,MAAM,8BAA8B,GAAG,wCAAU,CAAC;AAElD,kBAAe,8BAA8B,CAAC;AAC9C,uEAAiD;AAGjD,qEAA2C;AAC3C,yDAA6B;AAC7B,mEAAyC;AACzC,wDAA4B;AAC5B,2DAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/NotificationServicesController/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0GAA0D;AAGjD,qBAHF,wCAAU,CAGE;AADnB,MAAM,8BAA8B,GAAG,wCAAU,CAAC;AAElD,kBAAe,8BAA8B,CAAC;AAC9C,uEAAiD;AAGjD,qEAA2C;AAC3C,yDAA6B;AAC7B,mEAAyC;AACzC,wDAA4B;AAC5B,2DAAiC;AACjC,sDAA0B;AAC1B,mEAA8D;AAArD,sHAAA,iBAAiB,OAAA","sourcesContent":["import Controller from './NotificationServicesController';\n\nconst NotificationServicesController = Controller;\nexport { Controller };\nexport default NotificationServicesController;\nexport * from './NotificationServicesController';\nexport type * as Types from './types';\nexport type * from './types';\nexport * as Processors from './processors';\nexport * from './processors';\nexport * as Constants from './constants';\nexport * from './constants';\nexport * as Mocks from './mocks';\nexport * from '../shared';\nexport { isVersionInBounds } from './utils/isVersionInBounds';\n"]}
|
|
@@ -10,7 +10,6 @@ export * from "./processors/index.cjs";
|
|
|
10
10
|
export * as Constants from "./constants/index.cjs";
|
|
11
11
|
export * from "./constants/index.cjs";
|
|
12
12
|
export * as Mocks from "./mocks/index.cjs";
|
|
13
|
-
export * as UI from "./ui/index.cjs";
|
|
14
13
|
export * from "../shared/index.cjs";
|
|
15
14
|
export { isVersionInBounds } from "./utils/isVersionInBounds.cjs";
|
|
16
15
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/NotificationServicesController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,6CAAyC;AAE1D,QAAA,MAAM,8BAA8B,mBAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,8BAA8B,CAAC;AAC9C,qDAAiD;AACjD,YAAY,KAAK,KAAK,0BAAgB;AACtC,uCAA6B;AAC7B,OAAO,KAAK,UAAU,+BAAqB;AAC3C,uCAA6B;AAC7B,OAAO,KAAK,SAAS,8BAAoB;AACzC,sCAA4B;AAC5B,OAAO,KAAK,KAAK,0BAAgB;AACjC,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/NotificationServicesController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,6CAAyC;AAE1D,QAAA,MAAM,8BAA8B,mBAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,8BAA8B,CAAC;AAC9C,qDAAiD;AACjD,YAAY,KAAK,KAAK,0BAAgB;AACtC,uCAA6B;AAC7B,OAAO,KAAK,UAAU,+BAAqB;AAC3C,uCAA6B;AAC7B,OAAO,KAAK,SAAS,8BAAoB;AACzC,sCAA4B;AAC5B,OAAO,KAAK,KAAK,0BAAgB;AACjC,oCAA0B;AAC1B,OAAO,EAAE,iBAAiB,EAAE,sCAAkC"}
|
|
@@ -10,7 +10,6 @@ export * from "./processors/index.mjs";
|
|
|
10
10
|
export * as Constants from "./constants/index.mjs";
|
|
11
11
|
export * from "./constants/index.mjs";
|
|
12
12
|
export * as Mocks from "./mocks/index.mjs";
|
|
13
|
-
export * as UI from "./ui/index.mjs";
|
|
14
13
|
export * from "../shared/index.mjs";
|
|
15
14
|
export { isVersionInBounds } from "./utils/isVersionInBounds.mjs";
|
|
16
15
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/NotificationServicesController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,6CAAyC;AAE1D,QAAA,MAAM,8BAA8B,mBAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,8BAA8B,CAAC;AAC9C,qDAAiD;AACjD,YAAY,KAAK,KAAK,0BAAgB;AACtC,uCAA6B;AAC7B,OAAO,KAAK,UAAU,+BAAqB;AAC3C,uCAA6B;AAC7B,OAAO,KAAK,SAAS,8BAAoB;AACzC,sCAA4B;AAC5B,OAAO,KAAK,KAAK,0BAAgB;AACjC,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/NotificationServicesController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,6CAAyC;AAE1D,QAAA,MAAM,8BAA8B,mBAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,8BAA8B,CAAC;AAC9C,qDAAiD;AACjD,YAAY,KAAK,KAAK,0BAAgB;AACtC,uCAA6B;AAC7B,OAAO,KAAK,UAAU,+BAAqB;AAC3C,uCAA6B;AAC7B,OAAO,KAAK,SAAS,8BAAoB;AACzC,sCAA4B;AAC5B,OAAO,KAAK,KAAK,0BAAgB;AACjC,oCAA0B;AAC1B,OAAO,EAAE,iBAAiB,EAAE,sCAAkC"}
|
|
@@ -8,7 +8,6 @@ export * from "./processors/index.mjs";
|
|
|
8
8
|
export * as Constants from "./constants/index.mjs";
|
|
9
9
|
export * from "./constants/index.mjs";
|
|
10
10
|
export * as Mocks from "./mocks/index.mjs";
|
|
11
|
-
export * as UI from "./ui/index.mjs";
|
|
12
11
|
export * from "../shared/index.mjs";
|
|
13
12
|
export { isVersionInBounds } from "./utils/isVersionInBounds.mjs";
|
|
14
13
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/NotificationServicesController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,6CAAyC;AAE1D,MAAM,8BAA8B,GAAG,UAAU,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,8BAA8B,CAAC;AAC9C,qDAAiD;AAGjD,OAAO,KAAK,UAAU,+BAAqB;AAC3C,uCAA6B;AAC7B,OAAO,KAAK,SAAS,8BAAoB;AACzC,sCAA4B;AAC5B,OAAO,KAAK,KAAK,0BAAgB;AACjC,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/NotificationServicesController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,6CAAyC;AAE1D,MAAM,8BAA8B,GAAG,UAAU,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,8BAA8B,CAAC;AAC9C,qDAAiD;AAGjD,OAAO,KAAK,UAAU,+BAAqB;AAC3C,uCAA6B;AAC7B,OAAO,KAAK,SAAS,8BAAoB;AACzC,sCAA4B;AAC5B,OAAO,KAAK,KAAK,0BAAgB;AACjC,oCAA0B;AAC1B,OAAO,EAAE,iBAAiB,EAAE,sCAAkC","sourcesContent":["import Controller from './NotificationServicesController';\n\nconst NotificationServicesController = Controller;\nexport { Controller };\nexport default NotificationServicesController;\nexport * from './NotificationServicesController';\nexport type * as Types from './types';\nexport type * from './types';\nexport * as Processors from './processors';\nexport * from './processors';\nexport * as Constants from './constants';\nexport * from './constants';\nexport * as Mocks from './mocks';\nexport * from '../shared';\nexport { isVersionInBounds } from './utils/isVersionInBounds';\n"]}
|
|
@@ -30,8 +30,8 @@ function createMockFeatureAnnouncementAPIResult() {
|
|
|
30
30
|
},
|
|
31
31
|
id: '1ABRmHaNCgmxROKXXLXsMu',
|
|
32
32
|
type: 'Entry',
|
|
33
|
-
createdAt:
|
|
34
|
-
updatedAt:
|
|
33
|
+
createdAt: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString(),
|
|
34
|
+
updatedAt: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString(),
|
|
35
35
|
environment: {
|
|
36
36
|
sys: {
|
|
37
37
|
id: 'master',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-feature-announcements.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-feature-announcements.ts"],"names":[],"mappings":";;;AAAA,8EAAiE;AAIjE;;;;GAIG;AACH,SAAgB,sCAAsC;IACpD,OAAO;QACL,GAAG,EAAE;YACH,IAAI,EAAE,OAAO;SACd;QACD,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,KAAK,EAAE;YACL;gBACE,QAAQ,EAAE;oBACR,IAAI,EAAE,EAAE;iBACT;gBACD,GAAG,EAAE;oBACH,KAAK,EAAE;wBACL,GAAG,EAAE;4BACH,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,OAAO;4BACjB,EAAE,EAAE,cAAc;yBACnB;qBACF;oBACD,EAAE,EAAE,wBAAwB;oBAC5B,IAAI,EAAE,OAAO;oBACb,SAAS,EAAE,0BAA0B;oBACrC,SAAS,EAAE,0BAA0B;oBACrC,WAAW,EAAE;wBACX,GAAG,EAAE;4BACH,EAAE,EAAE,QAAQ;4BACZ,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,aAAa;yBACxB;qBACF;oBACD,QAAQ,EAAE,CAAC;oBACX,WAAW,EAAE;wBACX,GAAG,EAAE;4BAC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gC;IAC9C,OAAO;QACL,IAAI,EAAE,mCAAa,CAAC,qBAAqB;QACzC,SAAS,EAAE,0BAA0B;QACrC,IAAI,EAAE;YACJ,EAAE,EAAE,6CAA6C;YACjD,QAAQ,EAAE,cAAc;YACxB,KAAK,EAAE,+CAA+C;YACtD,eAAe,EAAE,uSAAuS;YACxT,gBAAgB,EACd,yGAAyG;YAC3G,KAAK,EAAE;gBACL,KAAK,EAAE,+CAA+C;gBACtD,WAAW,EAAE,EAAE;gBACf,GAAG,EAAE,+IAA+I;aACrJ;YACD,aAAa,EAAE;gBACb,iBAAiB,EAAE,SAAS;gBAC5B,kBAAkB,EAAE,WAAW;aAChC;SACF;KACF,CAAC;AACJ,CAAC;AAtBD,4EAsBC","sourcesContent":["import { TRIGGER_TYPES } from '../constants/notification-schema';\nimport type { ContentfulResult } from '../services/feature-announcements';\nimport type { FeatureAnnouncementRawNotification } from '../types/feature-announcement/feature-announcement';\n\n/**\n * Mocking Utility - create a mock normalized feature announcement\n *\n * @returns Mock Normalized Feature Announcement\n */\nexport function createMockFeatureAnnouncementAPIResult(): ContentfulResult {\n return {\n sys: {\n type: 'Array',\n },\n total: 17,\n skip: 0,\n limit: 1,\n items: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '1ABRmHaNCgmxROKXXLXsMu',\n type: 'Entry',\n createdAt: '2024-04-09T13:24:01.872Z',\n updatedAt: '2024-04-09T13:24:01.872Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n contentType: {\n sys: {\n type: 'Link',\n linkType: 'ContentType',\n id: 'productAnnouncement',\n },\n },\n locale: 'en-US',\n },\n fields: {\n title: 'Don’t miss out on airdrops and new NFT mints!',\n id: 'dont-miss-out-on-airdrops-and-new-nft-mints',\n category: 'ANNOUNCEMENT',\n shortDescription:\n 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started. ',\n image: {\n sys: {\n type: 'Link',\n linkType: 'Asset',\n id: '5jqq8sFeLc6XEoeWlpI3aB',\n },\n },\n longDescription: {\n data: {},\n content: [\n {\n data: {},\n content: [\n {\n data: {},\n marks: [],\n value:\n 'You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started. \\n',\n nodeType: 'text',\n },\n ],\n nodeType: 'paragraph',\n },\n ],\n nodeType: 'document',\n },\n link: {\n sys: {\n type: 'Link',\n linkType: 'Entry',\n id: '62xKYM2ydo4F1mS5q97K5q',\n },\n },\n },\n },\n ],\n includes: {\n Entry: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '62xKYM2ydo4F1mS5q97K5q',\n type: 'Entry',\n createdAt: '2024-04-09T13:23:03.636Z',\n updatedAt: '2024-04-09T13:23:03.636Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n contentType: {\n sys: {\n type: 'Link',\n linkType: 'ContentType',\n id: 'link',\n },\n },\n locale: 'en-US',\n },\n fields: {\n extensionLinkText: 'Try now',\n extensionLinkRoute: 'home.html',\n },\n },\n ],\n Asset: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '5jqq8sFeLc6XEoeWlpI3aB',\n type: 'Asset',\n createdAt: '2024-04-09T13:23:13.327Z',\n updatedAt: '2024-04-09T13:23:13.327Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n locale: 'en-US',\n },\n fields: {\n title: 'PDAPP notification image Airdrops & NFT mints',\n description: '',\n file: {\n url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',\n details: {\n size: 797731,\n image: {\n width: 2880,\n height: 1921,\n },\n },\n fileName: 'PDAPP notification image_Airdrops & NFT mints.png',\n contentType: 'image/png',\n },\n },\n },\n ],\n },\n } as unknown as ContentfulResult;\n}\n\n/**\n * Mocking Utility - create a mock raw feature announcement\n *\n * @returns Mock Raw Feature Announcement\n */\nexport function createMockFeatureAnnouncementRaw(): FeatureAnnouncementRawNotification {\n return {\n type: TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,\n createdAt: '2999-04-09T13:24:01.872Z',\n data: {\n id: 'dont-miss-out-on-airdrops-and-new-nft-mints',\n category: 'ANNOUNCEMENT',\n title: 'Don’t miss out on airdrops and new NFT mints!',\n longDescription: `<p>You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started.</p>`,\n shortDescription:\n 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started.',\n image: {\n title: 'PDAPP notification image Airdrops & NFT mints',\n description: '',\n url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',\n },\n extensionLink: {\n extensionLinkText: 'Try now',\n extensionLinkRoute: 'home.html',\n },\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"mock-feature-announcements.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-feature-announcements.ts"],"names":[],"mappings":";;;AAAA,8EAAiE;AAIjE;;;;GAIG;AACH,SAAgB,sCAAsC;IACpD,OAAO;QACL,GAAG,EAAE;YACH,IAAI,EAAE,OAAO;SACd;QACD,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC;QACP,KAAK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RIGGER_TYPES } from '../constants/notification-schema';\nimport type { ContentfulResult } from '../services/feature-announcements';\nimport type { FeatureAnnouncementRawNotification } from '../types/feature-announcement/feature-announcement';\n\n/**\n * Mocking Utility - create a mock normalized feature announcement\n *\n * @returns Mock Normalized Feature Announcement\n */\nexport function createMockFeatureAnnouncementAPIResult(): ContentfulResult {\n return {\n sys: {\n type: 'Array',\n },\n total: 17,\n skip: 0,\n limit: 1,\n items: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '1ABRmHaNCgmxROKXXLXsMu',\n type: 'Entry',\n createdAt: new Date(\n Date.now() - 30 * 24 * 60 * 60 * 1000, // 30 days ago\n ).toISOString(),\n updatedAt: new Date(\n Date.now() - 30 * 24 * 60 * 60 * 1000, // 30 days ago\n ).toISOString(),\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n contentType: {\n sys: {\n type: 'Link',\n linkType: 'ContentType',\n id: 'productAnnouncement',\n },\n },\n locale: 'en-US',\n },\n fields: {\n title: 'Don’t miss out on airdrops and new NFT mints!',\n id: 'dont-miss-out-on-airdrops-and-new-nft-mints',\n category: 'ANNOUNCEMENT',\n shortDescription:\n 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started. ',\n image: {\n sys: {\n type: 'Link',\n linkType: 'Asset',\n id: '5jqq8sFeLc6XEoeWlpI3aB',\n },\n },\n longDescription: {\n data: {},\n content: [\n {\n data: {},\n content: [\n {\n data: {},\n marks: [],\n value:\n 'You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started. \\n',\n nodeType: 'text',\n },\n ],\n nodeType: 'paragraph',\n },\n ],\n nodeType: 'document',\n },\n link: {\n sys: {\n type: 'Link',\n linkType: 'Entry',\n id: '62xKYM2ydo4F1mS5q97K5q',\n },\n },\n },\n },\n ],\n includes: {\n Entry: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '62xKYM2ydo4F1mS5q97K5q',\n type: 'Entry',\n createdAt: '2024-04-09T13:23:03.636Z',\n updatedAt: '2024-04-09T13:23:03.636Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n contentType: {\n sys: {\n type: 'Link',\n linkType: 'ContentType',\n id: 'link',\n },\n },\n locale: 'en-US',\n },\n fields: {\n extensionLinkText: 'Try now',\n extensionLinkRoute: 'home.html',\n },\n },\n ],\n Asset: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '5jqq8sFeLc6XEoeWlpI3aB',\n type: 'Asset',\n createdAt: '2024-04-09T13:23:13.327Z',\n updatedAt: '2024-04-09T13:23:13.327Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n locale: 'en-US',\n },\n fields: {\n title: 'PDAPP notification image Airdrops & NFT mints',\n description: '',\n file: {\n url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',\n details: {\n size: 797731,\n image: {\n width: 2880,\n height: 1921,\n },\n },\n fileName: 'PDAPP notification image_Airdrops & NFT mints.png',\n contentType: 'image/png',\n },\n },\n },\n ],\n },\n } as unknown as ContentfulResult;\n}\n\n/**\n * Mocking Utility - create a mock raw feature announcement\n *\n * @returns Mock Raw Feature Announcement\n */\nexport function createMockFeatureAnnouncementRaw(): FeatureAnnouncementRawNotification {\n return {\n type: TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,\n createdAt: '2999-04-09T13:24:01.872Z',\n data: {\n id: 'dont-miss-out-on-airdrops-and-new-nft-mints',\n category: 'ANNOUNCEMENT',\n title: 'Don’t miss out on airdrops and new NFT mints!',\n longDescription: `<p>You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started.</p>`,\n shortDescription:\n 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started.',\n image: {\n title: 'PDAPP notification image Airdrops & NFT mints',\n description: '',\n url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',\n },\n extensionLink: {\n extensionLinkText: 'Try now',\n extensionLinkRoute: 'home.html',\n },\n },\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-feature-announcements.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-feature-announcements.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,8CAA0C;AAC1E,OAAO,KAAK,EAAE,kCAAkC,EAAE,+DAA2D;AAE7G;;;;GAIG;AACH,wBAAgB,sCAAsC,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"mock-feature-announcements.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-feature-announcements.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,8CAA0C;AAC1E,OAAO,KAAK,EAAE,kCAAkC,EAAE,+DAA2D;AAE7G;;;;GAIG;AACH,wBAAgB,sCAAsC,IAAI,gBAAgB,CAgLzE;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,IAAI,kCAAkC,CAsBrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-feature-announcements.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-feature-announcements.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,8CAA0C;AAC1E,OAAO,KAAK,EAAE,kCAAkC,EAAE,+DAA2D;AAE7G;;;;GAIG;AACH,wBAAgB,sCAAsC,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"mock-feature-announcements.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-feature-announcements.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,8CAA0C;AAC1E,OAAO,KAAK,EAAE,kCAAkC,EAAE,+DAA2D;AAE7G;;;;GAIG;AACH,wBAAgB,sCAAsC,IAAI,gBAAgB,CAgLzE;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,IAAI,kCAAkC,CAsBrF"}
|
|
@@ -27,8 +27,8 @@ export function createMockFeatureAnnouncementAPIResult() {
|
|
|
27
27
|
},
|
|
28
28
|
id: '1ABRmHaNCgmxROKXXLXsMu',
|
|
29
29
|
type: 'Entry',
|
|
30
|
-
createdAt:
|
|
31
|
-
updatedAt:
|
|
30
|
+
createdAt: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString(),
|
|
31
|
+
updatedAt: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString(),
|
|
32
32
|
environment: {
|
|
33
33
|
sys: {
|
|
34
34
|
id: 'master',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-feature-announcements.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-feature-announcements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,6CAAyC;AAIjE;;;;GAIG;AACH,MAAM,UAAU,sCAAsC;IACpD,OAAO;QACL,GAAG,EAAE;YACH,IAAI,EAAE,OAAO;SACd;QACD,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;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ACZ,IAAI,EAAE,MAAM;gCACZ,QAAQ,EAAE,aAAa;6BACxB;yBACF;wBACD,QAAQ,EAAE,CAAC;wBACX,MAAM,EAAE,OAAO;qBAChB;oBACD,MAAM,EAAE;wBACN,KAAK,EAAE,+CAA+C;wBACtD,WAAW,EAAE,EAAE;wBACf,IAAI,EAAE;4BACJ,GAAG,EAAE,+IAA+I;4BACpJ,OAAO,EAAE;gCACP,IAAI,EAAE,MAAM;gCACZ,KAAK,EAAE;oCACL,KAAK,EAAE,IAAI;oCACX,MAAM,EAAE,IAAI;iCACb;6BACF;4BACD,QAAQ,EAAE,mDAAmD;4BAC7D,WAAW,EAAE,WAAW;yBACzB;qBACF;iBACF;aACF;SACF;KAC6B,CAAC;AACnC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gCAAgC;IAC9C,OAAO;QACL,IAAI,EAAE,aAAa,CAAC,qBAAqB;QACzC,SAAS,EAAE,0BAA0B;QACrC,IAAI,EAAE;YACJ,EAAE,EAAE,6CAA6C;YACjD,QAAQ,EAAE,cAAc;YACxB,KAAK,EAAE,+CAA+C;YACtD,eAAe,EAAE,uSAAuS;YACxT,gBAAgB,EACd,yGAAyG;YAC3G,KAAK,EAAE;gBACL,KAAK,EAAE,+CAA+C;gBACtD,WAAW,EAAE,EAAE;gBACf,GAAG,EAAE,+IAA+I;aACrJ;YACD,aAAa,EAAE;gBACb,iBAAiB,EAAE,SAAS;gBAC5B,kBAAkB,EAAE,WAAW;aAChC;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { TRIGGER_TYPES } from '../constants/notification-schema';\nimport type { ContentfulResult } from '../services/feature-announcements';\nimport type { FeatureAnnouncementRawNotification } from '../types/feature-announcement/feature-announcement';\n\n/**\n * Mocking Utility - create a mock normalized feature announcement\n *\n * @returns Mock Normalized Feature Announcement\n */\nexport function createMockFeatureAnnouncementAPIResult(): ContentfulResult {\n return {\n sys: {\n type: 'Array',\n },\n total: 17,\n skip: 0,\n limit: 1,\n items: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '1ABRmHaNCgmxROKXXLXsMu',\n type: 'Entry',\n createdAt: '2024-04-09T13:24:01.872Z',\n updatedAt: '2024-04-09T13:24:01.872Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n contentType: {\n sys: {\n type: 'Link',\n linkType: 'ContentType',\n id: 'productAnnouncement',\n },\n },\n locale: 'en-US',\n },\n fields: {\n title: 'Don’t miss out on airdrops and new NFT mints!',\n id: 'dont-miss-out-on-airdrops-and-new-nft-mints',\n category: 'ANNOUNCEMENT',\n shortDescription:\n 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started. ',\n image: {\n sys: {\n type: 'Link',\n linkType: 'Asset',\n id: '5jqq8sFeLc6XEoeWlpI3aB',\n },\n },\n longDescription: {\n data: {},\n content: [\n {\n data: {},\n content: [\n {\n data: {},\n marks: [],\n value:\n 'You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started. \\n',\n nodeType: 'text',\n },\n ],\n nodeType: 'paragraph',\n },\n ],\n nodeType: 'document',\n },\n link: {\n sys: {\n type: 'Link',\n linkType: 'Entry',\n id: '62xKYM2ydo4F1mS5q97K5q',\n },\n },\n },\n },\n ],\n includes: {\n Entry: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '62xKYM2ydo4F1mS5q97K5q',\n type: 'Entry',\n createdAt: '2024-04-09T13:23:03.636Z',\n updatedAt: '2024-04-09T13:23:03.636Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n contentType: {\n sys: {\n type: 'Link',\n linkType: 'ContentType',\n id: 'link',\n },\n },\n locale: 'en-US',\n },\n fields: {\n extensionLinkText: 'Try now',\n extensionLinkRoute: 'home.html',\n },\n },\n ],\n Asset: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '5jqq8sFeLc6XEoeWlpI3aB',\n type: 'Asset',\n createdAt: '2024-04-09T13:23:13.327Z',\n updatedAt: '2024-04-09T13:23:13.327Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n locale: 'en-US',\n },\n fields: {\n title: 'PDAPP notification image Airdrops & NFT mints',\n description: '',\n file: {\n url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',\n details: {\n size: 797731,\n image: {\n width: 2880,\n height: 1921,\n },\n },\n fileName: 'PDAPP notification image_Airdrops & NFT mints.png',\n contentType: 'image/png',\n },\n },\n },\n ],\n },\n } as unknown as ContentfulResult;\n}\n\n/**\n * Mocking Utility - create a mock raw feature announcement\n *\n * @returns Mock Raw Feature Announcement\n */\nexport function createMockFeatureAnnouncementRaw(): FeatureAnnouncementRawNotification {\n return {\n type: TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,\n createdAt: '2999-04-09T13:24:01.872Z',\n data: {\n id: 'dont-miss-out-on-airdrops-and-new-nft-mints',\n category: 'ANNOUNCEMENT',\n title: 'Don’t miss out on airdrops and new NFT mints!',\n longDescription: `<p>You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started.</p>`,\n shortDescription:\n 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started.',\n image: {\n title: 'PDAPP notification image Airdrops & NFT mints',\n description: '',\n url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',\n },\n extensionLink: {\n extensionLinkText: 'Try now',\n extensionLinkRoute: 'home.html',\n },\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"mock-feature-announcements.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-feature-announcements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,6CAAyC;AAIjE;;;;GAIG;AACH,MAAM,UAAU,sCAAsC;IACpD,OAAO;QACL,GAAG,EAAE;YACH,IAAI,EAAE,OAAO;SACd;QACD,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,KAAK,EAAE;YACL;gBACE,QAAQ,EAAE;oBACR,IAAI,EAAE,EAAE;iBACT;gBACD,GAAG,EAAE;oBACH,KAAK,EAAE;wBACL,GAAG,EAAE;4BACH,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,OAAO;4BACjB,EAAE,EAAE,cAAc;yBACnB;qBACF;oBACD,EAAE,EAAE,wBAAwB;oBAC5B,IAAI,EAAE,OAAO;oBACb,SAAS,EAAE,IAAI,IAAI,CACjB,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CACtC,CAAC,WAAW,EAAE;oBACf,SAAS,EAAE,IAAI,IAAI,CACjB,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CACtC,CAAC,WAAW,EAAE;oBACf,WAAW,EAAE;wBACX,GAAG,EAAE;4BACH,EAAE,EAAE,QAAQ;4BACZ,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,aAAa;yBACxB;qBACF;oBACD,QAAQ,EAAE,CAAC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;;GAIG;AACH,MAAM,UAAU,gCAAgC;IAC9C,OAAO;QACL,IAAI,EAAE,aAAa,CAAC,qBAAqB;QACzC,SAAS,EAAE,0BAA0B;QACrC,IAAI,EAAE;YACJ,EAAE,EAAE,6CAA6C;YACjD,QAAQ,EAAE,cAAc;YACxB,KAAK,EAAE,+CAA+C;YACtD,eAAe,EAAE,uSAAuS;YACxT,gBAAgB,EACd,yGAAyG;YAC3G,KAAK,EAAE;gBACL,KAAK,EAAE,+CAA+C;gBACtD,WAAW,EAAE,EAAE;gBACf,GAAG,EAAE,+IAA+I;aACrJ;YACD,aAAa,EAAE;gBACb,iBAAiB,EAAE,SAAS;gBAC5B,kBAAkB,EAAE,WAAW;aAChC;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { TRIGGER_TYPES } from '../constants/notification-schema';\nimport type { ContentfulResult } from '../services/feature-announcements';\nimport type { FeatureAnnouncementRawNotification } from '../types/feature-announcement/feature-announcement';\n\n/**\n * Mocking Utility - create a mock normalized feature announcement\n *\n * @returns Mock Normalized Feature Announcement\n */\nexport function createMockFeatureAnnouncementAPIResult(): ContentfulResult {\n return {\n sys: {\n type: 'Array',\n },\n total: 17,\n skip: 0,\n limit: 1,\n items: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '1ABRmHaNCgmxROKXXLXsMu',\n type: 'Entry',\n createdAt: new Date(\n Date.now() - 30 * 24 * 60 * 60 * 1000, // 30 days ago\n ).toISOString(),\n updatedAt: new Date(\n Date.now() - 30 * 24 * 60 * 60 * 1000, // 30 days ago\n ).toISOString(),\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n contentType: {\n sys: {\n type: 'Link',\n linkType: 'ContentType',\n id: 'productAnnouncement',\n },\n },\n locale: 'en-US',\n },\n fields: {\n title: 'Don’t miss out on airdrops and new NFT mints!',\n id: 'dont-miss-out-on-airdrops-and-new-nft-mints',\n category: 'ANNOUNCEMENT',\n shortDescription:\n 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started. ',\n image: {\n sys: {\n type: 'Link',\n linkType: 'Asset',\n id: '5jqq8sFeLc6XEoeWlpI3aB',\n },\n },\n longDescription: {\n data: {},\n content: [\n {\n data: {},\n content: [\n {\n data: {},\n marks: [],\n value:\n 'You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started. \\n',\n nodeType: 'text',\n },\n ],\n nodeType: 'paragraph',\n },\n ],\n nodeType: 'document',\n },\n link: {\n sys: {\n type: 'Link',\n linkType: 'Entry',\n id: '62xKYM2ydo4F1mS5q97K5q',\n },\n },\n },\n },\n ],\n includes: {\n Entry: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '62xKYM2ydo4F1mS5q97K5q',\n type: 'Entry',\n createdAt: '2024-04-09T13:23:03.636Z',\n updatedAt: '2024-04-09T13:23:03.636Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n contentType: {\n sys: {\n type: 'Link',\n linkType: 'ContentType',\n id: 'link',\n },\n },\n locale: 'en-US',\n },\n fields: {\n extensionLinkText: 'Try now',\n extensionLinkRoute: 'home.html',\n },\n },\n ],\n Asset: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '5jqq8sFeLc6XEoeWlpI3aB',\n type: 'Asset',\n createdAt: '2024-04-09T13:23:13.327Z',\n updatedAt: '2024-04-09T13:23:13.327Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n locale: 'en-US',\n },\n fields: {\n title: 'PDAPP notification image Airdrops & NFT mints',\n description: '',\n file: {\n url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',\n details: {\n size: 797731,\n image: {\n width: 2880,\n height: 1921,\n },\n },\n fileName: 'PDAPP notification image_Airdrops & NFT mints.png',\n contentType: 'image/png',\n },\n },\n },\n ],\n },\n } as unknown as ContentfulResult;\n}\n\n/**\n * Mocking Utility - create a mock raw feature announcement\n *\n * @returns Mock Raw Feature Announcement\n */\nexport function createMockFeatureAnnouncementRaw(): FeatureAnnouncementRawNotification {\n return {\n type: TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,\n createdAt: '2999-04-09T13:24:01.872Z',\n data: {\n id: 'dont-miss-out-on-airdrops-and-new-nft-mints',\n category: 'ANNOUNCEMENT',\n title: 'Don’t miss out on airdrops and new NFT mints!',\n longDescription: `<p>You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started.</p>`,\n shortDescription:\n 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started.',\n image: {\n title: 'PDAPP notification image Airdrops & NFT mints',\n description: '',\n url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',\n },\n extensionLink: {\n extensionLinkText: 'Try now',\n extensionLinkRoute: 'home.html',\n },\n },\n };\n}\n"]}
|
|
@@ -20,6 +20,14 @@ function createMockNotificationEthSent() {
|
|
|
20
20
|
block_timestamp: '2022-03-01T00:00:00Z',
|
|
21
21
|
tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
|
|
22
22
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
23
|
+
network: {
|
|
24
|
+
name: 'Ethereum',
|
|
25
|
+
native_symbol: 'ETH',
|
|
26
|
+
block_explorer: {
|
|
27
|
+
url: 'https://etherscan.io',
|
|
28
|
+
name: 'Etherscan',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
23
31
|
data: {
|
|
24
32
|
kind: 'eth_sent',
|
|
25
33
|
network_fee: {
|
|
@@ -56,6 +64,14 @@ function createMockNotificationEthReceived() {
|
|
|
56
64
|
block_timestamp: '2022-03-01T00:00:00Z',
|
|
57
65
|
tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
|
|
58
66
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
67
|
+
network: {
|
|
68
|
+
name: 'Ethereum',
|
|
69
|
+
native_symbol: 'ETH',
|
|
70
|
+
block_explorer: {
|
|
71
|
+
url: 'https://etherscan.io',
|
|
72
|
+
name: 'Etherscan',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
59
75
|
data: {
|
|
60
76
|
kind: 'eth_received',
|
|
61
77
|
network_fee: {
|
|
@@ -92,6 +108,14 @@ function createMockNotificationERC20Sent() {
|
|
|
92
108
|
block_timestamp: '2022-03-01T00:00:00Z',
|
|
93
109
|
tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
|
|
94
110
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
111
|
+
network: {
|
|
112
|
+
name: 'Ethereum',
|
|
113
|
+
native_symbol: 'ETH',
|
|
114
|
+
block_explorer: {
|
|
115
|
+
url: 'https://etherscan.io',
|
|
116
|
+
name: 'Etherscan',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
95
119
|
data: {
|
|
96
120
|
kind: 'erc20_sent',
|
|
97
121
|
network_fee: {
|
|
@@ -133,6 +157,14 @@ function createMockNotificationERC20Received() {
|
|
|
133
157
|
block_timestamp: '2022-03-01T00:00:00Z',
|
|
134
158
|
tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
|
|
135
159
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
160
|
+
network: {
|
|
161
|
+
name: 'Ethereum',
|
|
162
|
+
native_symbol: 'ETH',
|
|
163
|
+
block_explorer: {
|
|
164
|
+
url: 'https://etherscan.io',
|
|
165
|
+
name: 'Etherscan',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
136
168
|
data: {
|
|
137
169
|
kind: 'erc20_received',
|
|
138
170
|
network_fee: {
|
|
@@ -173,6 +205,14 @@ function createMockNotificationERC721Sent() {
|
|
|
173
205
|
block_timestamp: '1700043467',
|
|
174
206
|
chain_id: 1,
|
|
175
207
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
208
|
+
network: {
|
|
209
|
+
name: 'Ethereum',
|
|
210
|
+
native_symbol: 'ETH',
|
|
211
|
+
block_explorer: {
|
|
212
|
+
url: 'https://etherscan.io',
|
|
213
|
+
name: 'Etherscan',
|
|
214
|
+
},
|
|
215
|
+
},
|
|
176
216
|
data: {
|
|
177
217
|
to: '0xf47f628fe3bd2595e9ab384bfffc3859b448e451',
|
|
178
218
|
nft: {
|
|
@@ -216,6 +256,14 @@ function createMockNotificationERC721Received() {
|
|
|
216
256
|
block_timestamp: '1699980623',
|
|
217
257
|
chain_id: 1,
|
|
218
258
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
259
|
+
network: {
|
|
260
|
+
name: 'Ethereum',
|
|
261
|
+
native_symbol: 'ETH',
|
|
262
|
+
block_explorer: {
|
|
263
|
+
url: 'https://etherscan.io',
|
|
264
|
+
name: 'Etherscan',
|
|
265
|
+
},
|
|
266
|
+
},
|
|
219
267
|
data: {
|
|
220
268
|
to: '0xba7f3daa8adfdad686574406ab9bd5d2f0a49d2e',
|
|
221
269
|
nft: {
|
|
@@ -259,6 +307,14 @@ function createMockNotificationERC1155Sent() {
|
|
|
259
307
|
block_timestamp: '1700510003',
|
|
260
308
|
chain_id: 1,
|
|
261
309
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
310
|
+
network: {
|
|
311
|
+
name: 'Ethereum',
|
|
312
|
+
native_symbol: 'ETH',
|
|
313
|
+
block_explorer: {
|
|
314
|
+
url: 'https://etherscan.io',
|
|
315
|
+
name: 'Etherscan',
|
|
316
|
+
},
|
|
317
|
+
},
|
|
262
318
|
data: {
|
|
263
319
|
to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190',
|
|
264
320
|
nft: {
|
|
@@ -302,6 +358,14 @@ function createMockNotificationERC1155Received() {
|
|
|
302
358
|
block_timestamp: '1700510003',
|
|
303
359
|
chain_id: 1,
|
|
304
360
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
361
|
+
network: {
|
|
362
|
+
name: 'Ethereum',
|
|
363
|
+
native_symbol: 'ETH',
|
|
364
|
+
block_explorer: {
|
|
365
|
+
url: 'https://etherscan.io',
|
|
366
|
+
name: 'Etherscan',
|
|
367
|
+
},
|
|
368
|
+
},
|
|
305
369
|
data: {
|
|
306
370
|
to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190',
|
|
307
371
|
nft: {
|
|
@@ -345,6 +409,14 @@ function createMockNotificationMetaMaskSwapsCompleted() {
|
|
|
345
409
|
block_timestamp: '1697637275',
|
|
346
410
|
chain_id: 1,
|
|
347
411
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
412
|
+
network: {
|
|
413
|
+
name: 'Ethereum',
|
|
414
|
+
native_symbol: 'ETH',
|
|
415
|
+
block_explorer: {
|
|
416
|
+
url: 'https://etherscan.io',
|
|
417
|
+
name: 'Etherscan',
|
|
418
|
+
},
|
|
419
|
+
},
|
|
348
420
|
data: {
|
|
349
421
|
kind: 'metamask_swap_completed',
|
|
350
422
|
rate: '1558.27',
|
|
@@ -394,6 +466,14 @@ function createMockNotificationRocketPoolStakeCompleted() {
|
|
|
394
466
|
block_timestamp: '1700145059',
|
|
395
467
|
chain_id: 1,
|
|
396
468
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
469
|
+
network: {
|
|
470
|
+
name: 'Ethereum',
|
|
471
|
+
native_symbol: 'ETH',
|
|
472
|
+
block_explorer: {
|
|
473
|
+
url: 'https://etherscan.io',
|
|
474
|
+
name: 'Etherscan',
|
|
475
|
+
},
|
|
476
|
+
},
|
|
397
477
|
data: {
|
|
398
478
|
kind: 'rocketpool_stake_completed',
|
|
399
479
|
stake_in: {
|
|
@@ -442,6 +522,14 @@ function createMockNotificationRocketPoolUnStakeCompleted() {
|
|
|
442
522
|
block_timestamp: '1697718011',
|
|
443
523
|
chain_id: 1,
|
|
444
524
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
525
|
+
network: {
|
|
526
|
+
name: 'Ethereum',
|
|
527
|
+
native_symbol: 'ETH',
|
|
528
|
+
block_explorer: {
|
|
529
|
+
url: 'https://etherscan.io',
|
|
530
|
+
name: 'Etherscan',
|
|
531
|
+
},
|
|
532
|
+
},
|
|
445
533
|
data: {
|
|
446
534
|
kind: 'rocketpool_unstake_completed',
|
|
447
535
|
stake_in: {
|
|
@@ -490,6 +578,14 @@ function createMockNotificationLidoStakeCompleted() {
|
|
|
490
578
|
block_timestamp: '1698961091',
|
|
491
579
|
chain_id: 1,
|
|
492
580
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
581
|
+
network: {
|
|
582
|
+
name: 'Ethereum',
|
|
583
|
+
native_symbol: 'ETH',
|
|
584
|
+
block_explorer: {
|
|
585
|
+
url: 'https://etherscan.io',
|
|
586
|
+
name: 'Etherscan',
|
|
587
|
+
},
|
|
588
|
+
},
|
|
493
589
|
data: {
|
|
494
590
|
kind: 'lido_stake_completed',
|
|
495
591
|
stake_in: {
|
|
@@ -538,6 +634,14 @@ function createMockNotificationLidoWithdrawalRequested() {
|
|
|
538
634
|
block_timestamp: '1697638415',
|
|
539
635
|
chain_id: 1,
|
|
540
636
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
637
|
+
network: {
|
|
638
|
+
name: 'Ethereum',
|
|
639
|
+
native_symbol: 'ETH',
|
|
640
|
+
block_explorer: {
|
|
641
|
+
url: 'https://etherscan.io',
|
|
642
|
+
name: 'Etherscan',
|
|
643
|
+
},
|
|
644
|
+
},
|
|
541
645
|
data: {
|
|
542
646
|
kind: 'lido_withdrawal_requested',
|
|
543
647
|
stake_in: {
|
|
@@ -586,6 +690,14 @@ function createMockNotificationLidoWithdrawalCompleted() {
|
|
|
586
690
|
block_timestamp: '1697643851',
|
|
587
691
|
chain_id: 1,
|
|
588
692
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
693
|
+
network: {
|
|
694
|
+
name: 'Ethereum',
|
|
695
|
+
native_symbol: 'ETH',
|
|
696
|
+
block_explorer: {
|
|
697
|
+
url: 'https://etherscan.io',
|
|
698
|
+
name: 'Etherscan',
|
|
699
|
+
},
|
|
700
|
+
},
|
|
589
701
|
data: {
|
|
590
702
|
kind: 'lido_withdrawal_completed',
|
|
591
703
|
stake_in: {
|
|
@@ -634,6 +746,14 @@ function createMockNotificationLidoReadyToBeWithdrawn() {
|
|
|
634
746
|
block_timestamp: '1697643851',
|
|
635
747
|
chain_id: 1,
|
|
636
748
|
address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
|
|
749
|
+
network: {
|
|
750
|
+
name: 'Ethereum',
|
|
751
|
+
native_symbol: 'ETH',
|
|
752
|
+
block_explorer: {
|
|
753
|
+
url: 'https://etherscan.io',
|
|
754
|
+
name: 'Etherscan',
|
|
755
|
+
},
|
|
756
|
+
},
|
|
637
757
|
data: {
|
|
638
758
|
kind: 'lido_stake_ready_to_be_withdrawn',
|
|
639
759
|
request_id: '123456789',
|