@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.
Files changed (193) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/dist/NotificationServicesController/NotificationServicesController.cjs +56 -42
  3. package/dist/NotificationServicesController/NotificationServicesController.cjs.map +1 -1
  4. package/dist/NotificationServicesController/NotificationServicesController.d.cts +3 -2
  5. package/dist/NotificationServicesController/NotificationServicesController.d.cts.map +1 -1
  6. package/dist/NotificationServicesController/NotificationServicesController.d.mts +3 -2
  7. package/dist/NotificationServicesController/NotificationServicesController.d.mts.map +1 -1
  8. package/dist/NotificationServicesController/NotificationServicesController.mjs +56 -41
  9. package/dist/NotificationServicesController/NotificationServicesController.mjs.map +1 -1
  10. package/dist/NotificationServicesController/constants/notification-schema.cjs +4 -12
  11. package/dist/NotificationServicesController/constants/notification-schema.cjs.map +1 -1
  12. package/dist/NotificationServicesController/constants/notification-schema.d.cts +0 -12
  13. package/dist/NotificationServicesController/constants/notification-schema.d.cts.map +1 -1
  14. package/dist/NotificationServicesController/constants/notification-schema.d.mts +0 -12
  15. package/dist/NotificationServicesController/constants/notification-schema.d.mts.map +1 -1
  16. package/dist/NotificationServicesController/constants/notification-schema.mjs +3 -11
  17. package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -1
  18. package/dist/NotificationServicesController/index.cjs +1 -2
  19. package/dist/NotificationServicesController/index.cjs.map +1 -1
  20. package/dist/NotificationServicesController/index.d.cts +0 -1
  21. package/dist/NotificationServicesController/index.d.cts.map +1 -1
  22. package/dist/NotificationServicesController/index.d.mts +0 -1
  23. package/dist/NotificationServicesController/index.d.mts.map +1 -1
  24. package/dist/NotificationServicesController/index.mjs +0 -1
  25. package/dist/NotificationServicesController/index.mjs.map +1 -1
  26. package/dist/NotificationServicesController/mocks/mock-feature-announcements.cjs +2 -2
  27. package/dist/NotificationServicesController/mocks/mock-feature-announcements.cjs.map +1 -1
  28. package/dist/NotificationServicesController/mocks/mock-feature-announcements.d.cts.map +1 -1
  29. package/dist/NotificationServicesController/mocks/mock-feature-announcements.d.mts.map +1 -1
  30. package/dist/NotificationServicesController/mocks/mock-feature-announcements.mjs +2 -2
  31. package/dist/NotificationServicesController/mocks/mock-feature-announcements.mjs.map +1 -1
  32. package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs +120 -0
  33. package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs.map +1 -1
  34. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.cts.map +1 -1
  35. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.mts.map +1 -1
  36. package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs +120 -0
  37. package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs.map +1 -1
  38. package/dist/NotificationServicesController/mocks/mock-snap-notification.cjs.map +1 -1
  39. package/dist/NotificationServicesController/mocks/mock-snap-notification.d.cts +1 -1
  40. package/dist/NotificationServicesController/mocks/mock-snap-notification.d.cts.map +1 -1
  41. package/dist/NotificationServicesController/mocks/mock-snap-notification.d.mts +1 -1
  42. package/dist/NotificationServicesController/mocks/mock-snap-notification.d.mts.map +1 -1
  43. package/dist/NotificationServicesController/mocks/mock-snap-notification.mjs.map +1 -1
  44. package/dist/NotificationServicesController/mocks/mockResponses.cjs +6 -0
  45. package/dist/NotificationServicesController/mocks/mockResponses.cjs.map +1 -1
  46. package/dist/NotificationServicesController/mocks/mockResponses.d.cts.map +1 -1
  47. package/dist/NotificationServicesController/mocks/mockResponses.d.mts.map +1 -1
  48. package/dist/NotificationServicesController/mocks/mockResponses.mjs +6 -0
  49. package/dist/NotificationServicesController/mocks/mockResponses.mjs.map +1 -1
  50. package/dist/NotificationServicesController/processors/process-notifications.cjs +11 -9
  51. package/dist/NotificationServicesController/processors/process-notifications.cjs.map +1 -1
  52. package/dist/NotificationServicesController/processors/process-notifications.d.cts +1 -563
  53. package/dist/NotificationServicesController/processors/process-notifications.d.cts.map +1 -1
  54. package/dist/NotificationServicesController/processors/process-notifications.d.mts +1 -563
  55. package/dist/NotificationServicesController/processors/process-notifications.d.mts.map +1 -1
  56. package/dist/NotificationServicesController/processors/process-notifications.mjs +11 -9
  57. package/dist/NotificationServicesController/processors/process-notifications.mjs.map +1 -1
  58. package/dist/NotificationServicesController/processors/process-snap-notifications.cjs.map +1 -1
  59. package/dist/NotificationServicesController/processors/process-snap-notifications.d.cts +1 -1
  60. package/dist/NotificationServicesController/processors/process-snap-notifications.d.cts.map +1 -1
  61. package/dist/NotificationServicesController/processors/process-snap-notifications.d.mts +1 -1
  62. package/dist/NotificationServicesController/processors/process-snap-notifications.d.mts.map +1 -1
  63. package/dist/NotificationServicesController/processors/process-snap-notifications.mjs.map +1 -1
  64. package/dist/NotificationServicesController/services/api-notifications.cjs +21 -21
  65. package/dist/NotificationServicesController/services/api-notifications.cjs.map +1 -1
  66. package/dist/NotificationServicesController/services/api-notifications.d.cts.map +1 -1
  67. package/dist/NotificationServicesController/services/api-notifications.d.mts.map +1 -1
  68. package/dist/NotificationServicesController/services/api-notifications.mjs +21 -21
  69. package/dist/NotificationServicesController/services/api-notifications.mjs.map +1 -1
  70. package/dist/NotificationServicesController/services/feature-announcements.cjs +19 -10
  71. package/dist/NotificationServicesController/services/feature-announcements.cjs.map +1 -1
  72. package/dist/NotificationServicesController/services/feature-announcements.d.cts.map +1 -1
  73. package/dist/NotificationServicesController/services/feature-announcements.d.mts.map +1 -1
  74. package/dist/NotificationServicesController/services/feature-announcements.mjs +19 -10
  75. package/dist/NotificationServicesController/services/feature-announcements.mjs.map +1 -1
  76. package/dist/NotificationServicesController/services/notification-config-cache.cjs +4 -4
  77. package/dist/NotificationServicesController/services/notification-config-cache.cjs.map +1 -1
  78. package/dist/NotificationServicesController/services/notification-config-cache.mjs +4 -4
  79. package/dist/NotificationServicesController/services/notification-config-cache.mjs.map +1 -1
  80. package/dist/NotificationServicesController/services/perp-notifications.cjs +2 -2
  81. package/dist/NotificationServicesController/services/perp-notifications.cjs.map +1 -1
  82. package/dist/NotificationServicesController/services/perp-notifications.d.cts.map +1 -1
  83. package/dist/NotificationServicesController/services/perp-notifications.d.mts.map +1 -1
  84. package/dist/NotificationServicesController/services/perp-notifications.mjs +2 -2
  85. package/dist/NotificationServicesController/services/perp-notifications.mjs.map +1 -1
  86. package/dist/NotificationServicesController/types/notification-api/notification-api.cjs.map +1 -1
  87. package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts +2 -0
  88. package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts.map +1 -1
  89. package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts +2 -0
  90. package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts.map +1 -1
  91. package/dist/NotificationServicesController/types/notification-api/notification-api.mjs.map +1 -1
  92. package/dist/NotificationServicesController/types/notification-api/schema.cjs +2 -0
  93. package/dist/NotificationServicesController/types/notification-api/schema.cjs.map +1 -1
  94. package/dist/NotificationServicesController/types/notification-api/schema.d.cts +23 -0
  95. package/dist/NotificationServicesController/types/notification-api/schema.d.cts.map +1 -1
  96. package/dist/NotificationServicesController/types/notification-api/schema.d.mts +23 -0
  97. package/dist/NotificationServicesController/types/notification-api/schema.d.mts.map +1 -1
  98. package/dist/NotificationServicesController/types/notification-api/schema.mjs +2 -0
  99. package/dist/NotificationServicesController/types/notification-api/schema.mjs.map +1 -1
  100. package/dist/NotificationServicesController/types/perps/schema.cjs +2 -0
  101. package/dist/NotificationServicesController/types/perps/schema.cjs.map +1 -1
  102. package/dist/NotificationServicesController/types/perps/schema.d.cts.map +1 -1
  103. package/dist/NotificationServicesController/types/perps/schema.d.mts.map +1 -1
  104. package/dist/NotificationServicesController/types/perps/schema.mjs +2 -0
  105. package/dist/NotificationServicesController/types/perps/schema.mjs.map +1 -1
  106. package/dist/NotificationServicesController/utils/isVersionInBounds.cjs.map +1 -1
  107. package/dist/NotificationServicesController/utils/isVersionInBounds.d.cts.map +1 -1
  108. package/dist/NotificationServicesController/utils/isVersionInBounds.d.mts.map +1 -1
  109. package/dist/NotificationServicesController/utils/isVersionInBounds.mjs.map +1 -1
  110. package/dist/NotificationServicesController/utils/should-auto-expire.cjs.map +1 -1
  111. package/dist/NotificationServicesController/utils/should-auto-expire.d.cts.map +1 -1
  112. package/dist/NotificationServicesController/utils/should-auto-expire.d.mts.map +1 -1
  113. package/dist/NotificationServicesController/utils/should-auto-expire.mjs.map +1 -1
  114. package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs +0 -1
  115. package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs.map +1 -1
  116. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts +1 -1
  117. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts.map +1 -1
  118. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts +1 -1
  119. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts.map +1 -1
  120. package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +0 -1
  121. package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs.map +1 -1
  122. package/dist/NotificationServicesPushController/mocks/mockResponse.cjs.map +1 -1
  123. package/dist/NotificationServicesPushController/mocks/mockResponse.d.cts +9 -24
  124. package/dist/NotificationServicesPushController/mocks/mockResponse.d.cts.map +1 -1
  125. package/dist/NotificationServicesPushController/mocks/mockResponse.d.mts +9 -24
  126. package/dist/NotificationServicesPushController/mocks/mockResponse.d.mts.map +1 -1
  127. package/dist/NotificationServicesPushController/mocks/mockResponse.mjs.map +1 -1
  128. package/dist/NotificationServicesPushController/services/endpoints.cjs.map +1 -1
  129. package/dist/NotificationServicesPushController/services/endpoints.d.cts.map +1 -1
  130. package/dist/NotificationServicesPushController/services/endpoints.d.mts.map +1 -1
  131. package/dist/NotificationServicesPushController/services/endpoints.mjs.map +1 -1
  132. package/dist/NotificationServicesPushController/services/services.cjs.map +1 -1
  133. package/dist/NotificationServicesPushController/services/services.d.cts.map +1 -1
  134. package/dist/NotificationServicesPushController/services/services.d.mts.map +1 -1
  135. package/dist/NotificationServicesPushController/services/services.mjs.map +1 -1
  136. package/dist/NotificationServicesPushController/utils/get-notification-data.cjs +4 -4
  137. package/dist/NotificationServicesPushController/utils/get-notification-data.cjs.map +1 -1
  138. package/dist/NotificationServicesPushController/utils/get-notification-data.d.cts +2 -2
  139. package/dist/NotificationServicesPushController/utils/get-notification-data.d.cts.map +1 -1
  140. package/dist/NotificationServicesPushController/utils/get-notification-data.d.mts +2 -2
  141. package/dist/NotificationServicesPushController/utils/get-notification-data.d.mts.map +1 -1
  142. package/dist/NotificationServicesPushController/utils/get-notification-data.mjs +4 -4
  143. package/dist/NotificationServicesPushController/utils/get-notification-data.mjs.map +1 -1
  144. package/dist/NotificationServicesPushController/utils/get-notification-message.cjs +62 -71
  145. package/dist/NotificationServicesPushController/utils/get-notification-message.cjs.map +1 -1
  146. package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts +9 -9
  147. package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts.map +1 -1
  148. package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts +9 -9
  149. package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts.map +1 -1
  150. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +62 -71
  151. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs.map +1 -1
  152. package/dist/NotificationServicesPushController/web/push-utils.cjs +15 -7
  153. package/dist/NotificationServicesPushController/web/push-utils.cjs.map +1 -1
  154. package/dist/NotificationServicesPushController/web/push-utils.d.cts.map +1 -1
  155. package/dist/NotificationServicesPushController/web/push-utils.d.mts.map +1 -1
  156. package/dist/NotificationServicesPushController/web/push-utils.mjs +16 -8
  157. package/dist/NotificationServicesPushController/web/push-utils.mjs.map +1 -1
  158. package/dist/shared/is-onchain-notification.cjs +3 -3
  159. package/dist/shared/is-onchain-notification.cjs.map +1 -1
  160. package/dist/shared/is-onchain-notification.d.cts +2 -2
  161. package/dist/shared/is-onchain-notification.d.cts.map +1 -1
  162. package/dist/shared/is-onchain-notification.d.mts +2 -2
  163. package/dist/shared/is-onchain-notification.d.mts.map +1 -1
  164. package/dist/shared/is-onchain-notification.mjs +3 -3
  165. package/dist/shared/is-onchain-notification.mjs.map +1 -1
  166. package/dist/shared/to-raw-notification.cjs.map +1 -1
  167. package/dist/shared/to-raw-notification.mjs.map +1 -1
  168. package/package.json +12 -25
  169. package/dist/NotificationServicesController/ui/constants.cjs +0 -75
  170. package/dist/NotificationServicesController/ui/constants.cjs.map +0 -1
  171. package/dist/NotificationServicesController/ui/constants.d.cts +0 -66
  172. package/dist/NotificationServicesController/ui/constants.d.cts.map +0 -1
  173. package/dist/NotificationServicesController/ui/constants.d.mts +0 -66
  174. package/dist/NotificationServicesController/ui/constants.d.mts.map +0 -1
  175. package/dist/NotificationServicesController/ui/constants.mjs +0 -71
  176. package/dist/NotificationServicesController/ui/constants.mjs.map +0 -1
  177. package/dist/NotificationServicesController/ui/index.cjs +0 -18
  178. package/dist/NotificationServicesController/ui/index.cjs.map +0 -1
  179. package/dist/NotificationServicesController/ui/index.d.cts +0 -2
  180. package/dist/NotificationServicesController/ui/index.d.cts.map +0 -1
  181. package/dist/NotificationServicesController/ui/index.d.mts +0 -2
  182. package/dist/NotificationServicesController/ui/index.d.mts.map +0 -1
  183. package/dist/NotificationServicesController/ui/index.mjs +0 -2
  184. package/dist/NotificationServicesController/ui/index.mjs.map +0 -1
  185. package/dist/NotificationServicesPushController/services/push/push-web.cjs +0 -145
  186. package/dist/NotificationServicesPushController/services/push/push-web.cjs.map +0 -1
  187. package/dist/NotificationServicesPushController/services/push/push-web.d.cts +0 -34
  188. package/dist/NotificationServicesPushController/services/push/push-web.d.cts.map +0 -1
  189. package/dist/NotificationServicesPushController/services/push/push-web.d.mts +0 -34
  190. package/dist/NotificationServicesPushController/services/push/push-web.d.mts.map +0 -1
  191. package/dist/NotificationServicesPushController/services/push/push-web.mjs +0 -142
  192. package/dist/NotificationServicesPushController/services/push/push-web.mjs.map +0 -1
  193. package/notification-services/ui/package.json +0 -9
@@ -1 +1 @@
1
- {"version":3,"file":"mock-raw-notifications.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-raw-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,6CAAyC;AAGjE;;;;GAIG;AACH,MAAM,UAAU,6BAA6B;IAC3C,MAAM,gBAAgB,GAA8B;QAClD,IAAI,EAAE,aAAa,CAAC,QAAQ;QAC5B,iBAAiB,EAAE,UAAU;QAC7B,EAAE,EAAE,sCAAsC;QAC1C,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,sBAAsB;QAClC,OAAO,EAAE;YACP,QAAQ,EAAE,CAAC;YACX,YAAY,EAAE,QAAQ;YACtB,eAAe,EAAE,sBAAsB;YACvC,OAAO,EACL,oEAAoE;YACtE,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE;gBACJ,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE;oBACX,SAAS,EAAE,cAAc;oBACzB,yBAAyB,EAAE,MAAM;iBAClC;gBACD,IAAI,EAAE,4CAA4C;gBAClD,EAAE,EAAE,4CAA4C;gBAChD,MAAM,EAAE;oBACN,GAAG,EAAE,QAAQ;oBACb,GAAG,EAAE,OAAO;iBACb;aACF;SACF;KACF,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iCAAiC;IAC/C,MAAM,gBAAgB,GAA8B;QAClD,IAAI,EAAE,aAAa,CAAC,YAAY;QAChC,iBAAiB,EAAE,UAAU;QAC7B,EAAE,EAAE,sCAAsC;QAC1C,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,sBAAsB;QAClC,OAAO,EAAE;YACP,QAAQ,EAAE,CAAC;YACX,YAAY,EAAE,QAAQ;YACtB,eAAe,EAAE,sBAAsB;YACvC,OAAO,EACL,oEAAoE;YACtE,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE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CAAC;QAC5B,OAAO,YAAY,CAAC;IACtB,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { TRIGGER_TYPES } from '../constants/notification-schema';\nimport type { NormalisedAPINotification } from '../types/notification-api/notification-api';\n\n/**\n * Mocking Utility - create a mock Eth sent notification\n *\n * @returns Mock raw Eth sent notification\n */\nexport function createMockNotificationEthSent(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ETH_SENT,\n notification_type: 'on-chain',\n id: '3fa85f64-5717-4562-b3fc-2c963f66afa7',\n unread: true,\n created_at: '2022-03-01T00:00:00Z',\n payload: {\n chain_id: 1,\n block_number: 17485840,\n block_timestamp: '2022-03-01T00:00:00Z',\n tx_hash:\n '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'eth_sent',\n network_fee: {\n gas_price: '207806259583',\n native_token_price_in_usd: '0.83',\n },\n from: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n to: '0x881D40237659C251811CEC9c364ef91dC08D300D',\n amount: {\n usd: '670.64',\n eth: '0.005',\n },\n },\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Eth Received notification\n *\n * @returns Mock raw Eth Received notification\n */\nexport function createMockNotificationEthReceived(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ETH_RECEIVED,\n notification_type: 'on-chain',\n id: '3fa85f64-5717-4562-b3fc-2c963f66afa8',\n unread: true,\n created_at: '2022-03-01T00:00:00Z',\n payload: {\n chain_id: 1,\n block_number: 17485840,\n block_timestamp: '2022-03-01T00:00:00Z',\n tx_hash:\n '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'eth_received',\n network_fee: {\n gas_price: '207806259583',\n native_token_price_in_usd: '0.83',\n },\n from: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n to: '0x881D40237659C251811CEC9c364ef91dC08D300D',\n amount: {\n usd: '670.64',\n eth: '808.000000000000000000',\n },\n },\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC20 sent notification\n *\n * @returns Mock raw ERC20 sent notification\n */\nexport function createMockNotificationERC20Sent(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC20_SENT,\n notification_type: 'on-chain',\n id: '3fa85f64-5717-4562-b3fc-2c963f66afa9',\n unread: true,\n created_at: '2022-03-01T00:00:00Z',\n payload: {\n chain_id: 1,\n block_number: 17485840,\n block_timestamp: '2022-03-01T00:00:00Z',\n tx_hash:\n '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'erc20_sent',\n network_fee: {\n gas_price: '207806259583',\n native_token_price_in_usd: '0.83',\n },\n to: '0xecc19e177d24551aa7ed6bc6fe566eca726cc8a9',\n from: '0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae',\n token: {\n usd: '1.00',\n name: 'USDC',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/usdc.svg',\n amount: '4956250000',\n symbol: 'USDC',\n address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n decimals: '6',\n },\n },\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC20 received notification\n *\n * @returns Mock raw ERC20 received notification\n */\nexport function createMockNotificationERC20Received(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC20_RECEIVED,\n notification_type: 'on-chain',\n id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',\n unread: true,\n created_at: '2022-03-01T00:00:00Z',\n payload: {\n chain_id: 1,\n block_number: 17485840,\n block_timestamp: '2022-03-01T00:00:00Z',\n tx_hash:\n '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'erc20_received',\n network_fee: {\n gas_price: '207806259583',\n native_token_price_in_usd: '0.83',\n },\n to: '0xeae7380dd4cef6fbd1144f49e4d1e6964258a4f4',\n from: '0x51c72848c68a965f66fa7a88855f9f7784502a7f',\n token: {\n usd: '0.00',\n name: 'SHIBA INU',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/shib.svg',\n amount: '8382798736999999457296646144',\n symbol: 'SHIB',\n address: '0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce',\n decimals: '18',\n },\n },\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC721 sent notification\n *\n * @returns Mock raw ERC721 sent notification\n */\nexport function createMockNotificationERC721Sent(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC721_SENT,\n notification_type: 'on-chain',\n id: 'a4193058-9814-537e-9df4-79dcac727fb6',\n created_at: '2023-11-15T11:08:17.895407Z',\n unread: true,\n payload: {\n block_number: 18576643,\n block_timestamp: '1700043467',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n to: '0xf47f628fe3bd2595e9ab384bfffc3859b448e451',\n nft: {\n name: 'Captainz #8680',\n image:\n 'https://i.seadn.io/s/raw/files/ae0fc06714ff7fb40217340d8a242c0e.gif?w=500&auto=format',\n token_id: '8680',\n collection: {\n name: 'The Captainz',\n image:\n 'https://i.seadn.io/gcs/files/6df4d75778066bce740050615bc84e21.png?w=500&auto=format',\n symbol: 'Captainz',\n address: '0x769272677fab02575e84945f03eca517acc544cc',\n },\n },\n from: '0x24a0bb54b7e7a8e406e9b28058a9fd6c49e6df4f',\n kind: 'erc721_sent',\n network_fee: {\n gas_price: '24550653274',\n native_token_price_in_usd: '1986.61',\n },\n },\n tx_hash:\n '0x0833c69fb41cf972a0f031fceca242939bc3fcf82b964b74606649abcad371bd',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC721 received notification\n *\n * @returns Mock raw ERC721 received notification\n */\nexport function createMockNotificationERC721Received(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC721_RECEIVED,\n notification_type: 'on-chain',\n id: '00a79d24-befa-57ed-a55a-9eb8696e1654',\n created_at: '2023-11-14T17:40:52.319281Z',\n unread: true,\n payload: {\n block_number: 18571446,\n block_timestamp: '1699980623',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n to: '0xba7f3daa8adfdad686574406ab9bd5d2f0a49d2e',\n nft: {\n name: 'The Plague #2722',\n image:\n 'https://i.seadn.io/s/raw/files/a96f90ec8ebf55a2300c66a0c46d6a16.png?w=500&auto=format',\n token_id: '2722',\n collection: {\n name: 'The Plague NFT',\n image:\n 'https://i.seadn.io/gcs/files/4577987a5ca45ca5118b2e31559ee4d1.jpg?w=500&auto=format',\n symbol: 'FROG',\n address: '0xc379e535caff250a01caa6c3724ed1359fe5c29b',\n },\n },\n from: '0x24a0bb54b7e7a8e406e9b28058a9fd6c49e6df4f',\n kind: 'erc721_received',\n network_fee: {\n gas_price: '53701898538',\n native_token_price_in_usd: '2047.01',\n },\n },\n tx_hash:\n '0xe554c9e29e6eeca8ba94da4d047334ba08b8eb9ca3b801dd69cec08dfdd4ae43',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC1155 sent notification\n *\n * @returns Mock raw ERC1155 sent notification\n */\nexport function createMockNotificationERC1155Sent(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC1155_SENT,\n notification_type: 'on-chain',\n id: 'a09ff9d1-623a-52ab-a3d4-c7c8c9a58362',\n created_at: '2023-11-20T20:44:10.110706Z',\n unread: true,\n payload: {\n block_number: 18615206,\n block_timestamp: '1700510003',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190',\n nft: {\n name: 'IlluminatiNFT DAO',\n image:\n 'https://i.seadn.io/gcs/files/79a77cb37c7b2f1069f752645d29fea7.jpg?w=500&auto=format',\n token_id: '1',\n collection: {\n name: 'IlluminatiNFT DAO',\n image:\n 'https://i.seadn.io/gae/LTKz3om2eCQfn3M6PkqEmY7KhLtdMCOm0QVch2318KJq7-KyToCH7NBTMo4UuJ0AZI-oaBh1HcgrAEIEWYbXY3uMcYpuGXunaXEh?w=500&auto=format',\n symbol: 'TRUTH',\n address: '0xe25f0fe686477f9df3c2876c4902d3b85f75f33a',\n },\n },\n from: '0x0000000000000000000000000000000000000000',\n kind: 'erc1155_sent',\n network_fee: {\n gas_price: '33571446596',\n native_token_price_in_usd: '2038.88',\n },\n },\n tx_hash:\n '0x03381aba290facbaf71c123e263c8dc3dd550aac00ef589cce395182eaeff76f',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC1155 received notification\n *\n * @returns Mock raw ERC1155 received notification\n */\nexport function createMockNotificationERC1155Received(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC1155_RECEIVED,\n notification_type: 'on-chain',\n id: 'b6b93c84-e8dc-54ed-9396-7ea50474843a',\n created_at: '2023-11-20T20:44:10.110706Z',\n unread: true,\n payload: {\n block_number: 18615206,\n block_timestamp: '1700510003',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190',\n nft: {\n name: 'IlluminatiNFT DAO',\n image:\n 'https://i.seadn.io/gcs/files/79a77cb37c7b2f1069f752645d29fea7.jpg?w=500&auto=format',\n token_id: '1',\n collection: {\n name: 'IlluminatiNFT DAO',\n image:\n 'https://i.seadn.io/gae/LTKz3om2eCQfn3M6PkqEmY7KhLtdMCOm0QVch2318KJq7-KyToCH7NBTMo4UuJ0AZI-oaBh1HcgrAEIEWYbXY3uMcYpuGXunaXEh?w=500&auto=format',\n symbol: 'TRUTH',\n address: '0xe25f0fe686477f9df3c2876c4902d3b85f75f33a',\n },\n },\n from: '0x0000000000000000000000000000000000000000',\n kind: 'erc1155_received',\n network_fee: {\n gas_price: '33571446596',\n native_token_price_in_usd: '2038.88',\n },\n },\n tx_hash:\n '0x03381aba290facbaf71c123e263c8dc3dd550aac00ef589cce395182eaeff76f',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock MetaMask Swaps notification\n *\n * @returns Mock raw MetaMask Swaps notification\n */\nexport function createMockNotificationMetaMaskSwapsCompleted(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,\n notification_type: 'on-chain',\n id: '7ddfe6a1-ac52-5ffe-aa40-f04242db4b8b',\n created_at: '2023-10-18T13:58:49.854596Z',\n unread: true,\n payload: {\n block_number: 18377666,\n block_timestamp: '1697637275',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'metamask_swap_completed',\n rate: '1558.27',\n token_in: {\n usd: '1576.73',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '9000000000000000',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n name: 'Ethereum',\n },\n token_out: {\n usd: '1.00',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/usdt.svg',\n amount: '14024419',\n symbol: 'USDT',\n address: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n decimals: '6',\n name: 'USDT',\n },\n network_fee: {\n gas_price: '15406129273',\n native_token_price_in_usd: '1576.73',\n },\n },\n tx_hash:\n '0xf69074290f3aa11bce567aabc9ca0df7a12559dfae1b80ba1a124e9dfe19ecc5',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock RocketPool Stake Completed notification\n *\n * @returns Mock raw RocketPool Stake Completed notification\n */\nexport function createMockNotificationRocketPoolStakeCompleted(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,\n notification_type: 'on-chain',\n id: 'c2a2f225-b2fb-5d6c-ba56-e27a5c71ffb9',\n created_at: '2023-11-20T12:02:48.796824Z',\n unread: true,\n payload: {\n block_number: 18585057,\n block_timestamp: '1700145059',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'rocketpool_stake_completed',\n stake_in: {\n usd: '2031.86',\n name: 'Ethereum',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '190690478063438272',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n },\n stake_out: {\n usd: '2226.49',\n name: 'Rocket Pool ETH',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/rETH.svg',\n amount: '175024360778165879',\n symbol: 'RETH',\n address: '0xae78736Cd615f374D3085123A210448E74Fc6393',\n decimals: '18',\n },\n network_fee: {\n gas_price: '36000000000',\n native_token_price_in_usd: '2031.86',\n },\n },\n tx_hash:\n '0xcfc0693bf47995907b0f46ef0644cf16dd9a0de797099b2e00fd481e1b2117d3',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock RocketPool Un-staked notification\n *\n * @returns Mock raw RocketPool Un-staked notification\n */\nexport function createMockNotificationRocketPoolUnStakeCompleted(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,\n notification_type: 'on-chain',\n id: '291ec897-f569-4837-b6c0-21001b198dff',\n created_at: '2023-10-19T13:11:10.623042Z',\n unread: true,\n payload: {\n block_number: 18384336,\n block_timestamp: '1697718011',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'rocketpool_unstake_completed',\n stake_in: {\n usd: '1686.34',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/rETH.svg',\n amount: '66608041413696770',\n symbol: 'RETH',\n address: '0xae78736Cd615f374D3085123A210448E74Fc6393',\n decimals: '18',\n name: 'Rocketpool Eth',\n },\n stake_out: {\n usd: '1553.75',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '72387843427700824',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n name: 'Ethereum',\n },\n network_fee: {\n gas_price: '5656322987',\n native_token_price_in_usd: '1553.75',\n },\n },\n tx_hash:\n '0xc7972a7e409abfc62590ec90e633acd70b9b74e76ad02305be8bf133a0e22d5f',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Lido Stake Completed notification\n *\n * @returns Mock raw Lido Stake Completed notification\n */\nexport function createMockNotificationLidoStakeCompleted(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.LIDO_STAKE_COMPLETED,\n notification_type: 'on-chain',\n id: 'ec10d66a-f78f-461f-83c9-609aada8cc50',\n created_at: '2023-11-02T22:28:49.970865Z',\n unread: true,\n payload: {\n block_number: 18487118,\n block_timestamp: '1698961091',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'lido_stake_completed',\n stake_in: {\n usd: '1806.33',\n name: 'Ethereum',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '330303634023928032',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n },\n stake_out: {\n usd: '1801.30',\n name: 'Liquid staked Ether 2.0',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',\n amount: '330303634023928032',\n symbol: 'STETH',\n address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',\n decimals: '18',\n },\n network_fee: {\n gas_price: '26536359866',\n native_token_price_in_usd: '1806.33',\n },\n },\n tx_hash:\n '0x8cc0fa805f7c3b1743b14f3b91c6b824113b094f26d4ccaf6a71ad8547ce6a0f',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Lido Withdrawal Requested notification\n *\n * @returns Mock raw Lido Withdrawal Requested notification\n */\nexport function createMockNotificationLidoWithdrawalRequested(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,\n notification_type: 'on-chain',\n id: 'ef003925-3379-4ba7-9e2d-8218690cadc9',\n created_at: '2023-10-18T15:04:02.482526Z',\n unread: true,\n payload: {\n block_number: 18377760,\n block_timestamp: '1697638415',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'lido_withdrawal_requested',\n stake_in: {\n usd: '1568.54',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',\n amount: '97180668792218669859',\n symbol: 'STETH',\n address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',\n decimals: '18',\n name: 'Staked Eth',\n },\n stake_out: {\n usd: '1576.73',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '97180668792218669859',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n name: 'Ethereum',\n },\n network_fee: {\n gas_price: '11658906980',\n native_token_price_in_usd: '1576.73',\n },\n },\n tx_hash:\n '0x58b5f82e084cb750ea174e02b20fbdfd2ba8d78053deac787f34fc38e5d427aa',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Lido Withdrawal Completed notification\n *\n * @returns Mock raw Lido Withdrawal Completed notification\n */\nexport function createMockNotificationLidoWithdrawalCompleted(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,\n notification_type: 'on-chain',\n id: 'd73df14d-ce73-4f38-bad3-ab028154042f',\n created_at: '2023-10-18T16:35:03.147606Z',\n unread: true,\n payload: {\n block_number: 18378208,\n block_timestamp: '1697643851',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'lido_withdrawal_completed',\n stake_in: {\n usd: '1570.23',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',\n amount: '35081997661451346',\n symbol: 'STETH',\n address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',\n decimals: '18',\n name: 'Staked Eth',\n },\n stake_out: {\n usd: '1571.74',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '35081997661451346',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n name: 'Ethereum',\n },\n network_fee: {\n gas_price: '12699495150',\n native_token_price_in_usd: '1571.74',\n },\n },\n tx_hash:\n '0xe6d210d2e601ef3dd1075c48e71452cf35f2daae3886911e964e3babad8ac657',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Lido Withdrawal Ready notification\n *\n * @returns Mock raw Lido Withdrawal Ready notification\n */\nexport function createMockNotificationLidoReadyToBeWithdrawn(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN,\n notification_type: 'on-chain',\n id: 'd73df14d-ce73-4f38-bad3-ab028154042e',\n created_at: '2023-10-18T16:35:03.147606Z',\n unread: true,\n payload: {\n block_number: 18378208,\n block_timestamp: '1697643851',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n data: {\n kind: 'lido_stake_ready_to_be_withdrawn',\n request_id: '123456789',\n staked_eth: {\n address: '0x881D40237659C251811CEC9c364ef91dC08D300F',\n symbol: 'ETH',\n name: 'Ethereum',\n amount: '2.5',\n decimals: '18',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n usd: '10000.00',\n },\n },\n tx_hash:\n '0xe6d210d2e601ef3dd1075c48e71452cf35f2daae3886911e964e3babad8ac657',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Generic Platform notification\n *\n * @returns Mock raw Generic Platform notification\n */\nexport function createMockPlatformNotification(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.PLATFORM,\n notification_type: 'platform',\n id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',\n unread: true,\n created_at: '2025-10-09T09:45:34.202Z',\n template: {\n image_url:\n 'https://images.ctfassets.net/clixtyxoaeas/4rnpEzy1ATWRKVBOLxZ1Fm/a74dc1eed36d23d7ea6030383a4d5163/MetaMask-icon-fox.svg',\n title: 'This is a Platform Notification!',\n body: 'Teams can now build out their own notifications, and add an optional CTA (like this one below).',\n cta: {\n content: 'Get Started',\n link: 'https://metamask.io/get-started',\n },\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - creates an array of raw on-chain notifications\n *\n * @returns Array of raw on-chain notifications\n */\nexport function createMockRawOnChainNotifications(): NormalisedAPINotification[] {\n return [1, 2, 3].map((id) => {\n const notification = createMockNotificationEthSent();\n notification.id += `-${id}`;\n return notification;\n });\n}\n"]}
1
+ {"version":3,"file":"mock-raw-notifications.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-raw-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,6CAAyC;AAGjE;;;;GAIG;AACH,MAAM,UAAU,6BAA6B;IAC3C,MAAM,gBAAgB,GAA8B;QAClD,IAAI,EAAE,aAAa,CAAC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AoE;SACvE;KACF,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,8BAA8B;IAC5C,MAAM,gBAAgB,GAA8B;QAClD,IAAI,EAAE,aAAa,CAAC,QAAQ;QAC5B,iBAAiB,EAAE,UAAU;QAC7B,EAAE,EAAE,sCAAsC;QAC1C,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,0BAA0B;QACtC,QAAQ,EAAE;YACR,SAAS,EACP,yHAAyH;YAC3H,KAAK,EAAE,kCAAkC;YACzC,IAAI,EAAE,iGAAiG;YACvG,GAAG,EAAE;gBACH,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,iCAAiC;aACxC;SACF;KACF,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iCAAiC;IAC/C,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;QAC1B,MAAM,YAAY,GAAG,6BAA6B,EAAE,CAAC;QACrD,YAAY,CAAC,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;QAC5B,OAAO,YAAY,CAAC;IACtB,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { TRIGGER_TYPES } from '../constants/notification-schema';\nimport type { NormalisedAPINotification } from '../types/notification-api/notification-api';\n\n/**\n * Mocking Utility - create a mock Eth sent notification\n *\n * @returns Mock raw Eth sent notification\n */\nexport function createMockNotificationEthSent(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ETH_SENT,\n notification_type: 'on-chain',\n id: '3fa85f64-5717-4562-b3fc-2c963f66afa7',\n unread: true,\n created_at: '2022-03-01T00:00:00Z',\n payload: {\n chain_id: 1,\n block_number: 17485840,\n block_timestamp: '2022-03-01T00:00:00Z',\n tx_hash:\n '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'eth_sent',\n network_fee: {\n gas_price: '207806259583',\n native_token_price_in_usd: '0.83',\n },\n from: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n to: '0x881D40237659C251811CEC9c364ef91dC08D300D',\n amount: {\n usd: '670.64',\n eth: '0.005',\n },\n },\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Eth Received notification\n *\n * @returns Mock raw Eth Received notification\n */\nexport function createMockNotificationEthReceived(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ETH_RECEIVED,\n notification_type: 'on-chain',\n id: '3fa85f64-5717-4562-b3fc-2c963f66afa8',\n unread: true,\n created_at: '2022-03-01T00:00:00Z',\n payload: {\n chain_id: 1,\n block_number: 17485840,\n block_timestamp: '2022-03-01T00:00:00Z',\n tx_hash:\n '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'eth_received',\n network_fee: {\n gas_price: '207806259583',\n native_token_price_in_usd: '0.83',\n },\n from: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n to: '0x881D40237659C251811CEC9c364ef91dC08D300D',\n amount: {\n usd: '670.64',\n eth: '808.000000000000000000',\n },\n },\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC20 sent notification\n *\n * @returns Mock raw ERC20 sent notification\n */\nexport function createMockNotificationERC20Sent(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC20_SENT,\n notification_type: 'on-chain',\n id: '3fa85f64-5717-4562-b3fc-2c963f66afa9',\n unread: true,\n created_at: '2022-03-01T00:00:00Z',\n payload: {\n chain_id: 1,\n block_number: 17485840,\n block_timestamp: '2022-03-01T00:00:00Z',\n tx_hash:\n '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'erc20_sent',\n network_fee: {\n gas_price: '207806259583',\n native_token_price_in_usd: '0.83',\n },\n to: '0xecc19e177d24551aa7ed6bc6fe566eca726cc8a9',\n from: '0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae',\n token: {\n usd: '1.00',\n name: 'USDC',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/usdc.svg',\n amount: '4956250000',\n symbol: 'USDC',\n address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n decimals: '6',\n },\n },\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC20 received notification\n *\n * @returns Mock raw ERC20 received notification\n */\nexport function createMockNotificationERC20Received(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC20_RECEIVED,\n notification_type: 'on-chain',\n id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',\n unread: true,\n created_at: '2022-03-01T00:00:00Z',\n payload: {\n chain_id: 1,\n block_number: 17485840,\n block_timestamp: '2022-03-01T00:00:00Z',\n tx_hash:\n '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'erc20_received',\n network_fee: {\n gas_price: '207806259583',\n native_token_price_in_usd: '0.83',\n },\n to: '0xeae7380dd4cef6fbd1144f49e4d1e6964258a4f4',\n from: '0x51c72848c68a965f66fa7a88855f9f7784502a7f',\n token: {\n usd: '0.00',\n name: 'SHIBA INU',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/shib.svg',\n amount: '8382798736999999457296646144',\n symbol: 'SHIB',\n address: '0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce',\n decimals: '18',\n },\n },\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC721 sent notification\n *\n * @returns Mock raw ERC721 sent notification\n */\nexport function createMockNotificationERC721Sent(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC721_SENT,\n notification_type: 'on-chain',\n id: 'a4193058-9814-537e-9df4-79dcac727fb6',\n created_at: '2023-11-15T11:08:17.895407Z',\n unread: true,\n payload: {\n block_number: 18576643,\n block_timestamp: '1700043467',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n to: '0xf47f628fe3bd2595e9ab384bfffc3859b448e451',\n nft: {\n name: 'Captainz #8680',\n image:\n 'https://i.seadn.io/s/raw/files/ae0fc06714ff7fb40217340d8a242c0e.gif?w=500&auto=format',\n token_id: '8680',\n collection: {\n name: 'The Captainz',\n image:\n 'https://i.seadn.io/gcs/files/6df4d75778066bce740050615bc84e21.png?w=500&auto=format',\n symbol: 'Captainz',\n address: '0x769272677fab02575e84945f03eca517acc544cc',\n },\n },\n from: '0x24a0bb54b7e7a8e406e9b28058a9fd6c49e6df4f',\n kind: 'erc721_sent',\n network_fee: {\n gas_price: '24550653274',\n native_token_price_in_usd: '1986.61',\n },\n },\n tx_hash:\n '0x0833c69fb41cf972a0f031fceca242939bc3fcf82b964b74606649abcad371bd',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC721 received notification\n *\n * @returns Mock raw ERC721 received notification\n */\nexport function createMockNotificationERC721Received(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC721_RECEIVED,\n notification_type: 'on-chain',\n id: '00a79d24-befa-57ed-a55a-9eb8696e1654',\n created_at: '2023-11-14T17:40:52.319281Z',\n unread: true,\n payload: {\n block_number: 18571446,\n block_timestamp: '1699980623',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n to: '0xba7f3daa8adfdad686574406ab9bd5d2f0a49d2e',\n nft: {\n name: 'The Plague #2722',\n image:\n 'https://i.seadn.io/s/raw/files/a96f90ec8ebf55a2300c66a0c46d6a16.png?w=500&auto=format',\n token_id: '2722',\n collection: {\n name: 'The Plague NFT',\n image:\n 'https://i.seadn.io/gcs/files/4577987a5ca45ca5118b2e31559ee4d1.jpg?w=500&auto=format',\n symbol: 'FROG',\n address: '0xc379e535caff250a01caa6c3724ed1359fe5c29b',\n },\n },\n from: '0x24a0bb54b7e7a8e406e9b28058a9fd6c49e6df4f',\n kind: 'erc721_received',\n network_fee: {\n gas_price: '53701898538',\n native_token_price_in_usd: '2047.01',\n },\n },\n tx_hash:\n '0xe554c9e29e6eeca8ba94da4d047334ba08b8eb9ca3b801dd69cec08dfdd4ae43',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC1155 sent notification\n *\n * @returns Mock raw ERC1155 sent notification\n */\nexport function createMockNotificationERC1155Sent(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC1155_SENT,\n notification_type: 'on-chain',\n id: 'a09ff9d1-623a-52ab-a3d4-c7c8c9a58362',\n created_at: '2023-11-20T20:44:10.110706Z',\n unread: true,\n payload: {\n block_number: 18615206,\n block_timestamp: '1700510003',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190',\n nft: {\n name: 'IlluminatiNFT DAO',\n image:\n 'https://i.seadn.io/gcs/files/79a77cb37c7b2f1069f752645d29fea7.jpg?w=500&auto=format',\n token_id: '1',\n collection: {\n name: 'IlluminatiNFT DAO',\n image:\n 'https://i.seadn.io/gae/LTKz3om2eCQfn3M6PkqEmY7KhLtdMCOm0QVch2318KJq7-KyToCH7NBTMo4UuJ0AZI-oaBh1HcgrAEIEWYbXY3uMcYpuGXunaXEh?w=500&auto=format',\n symbol: 'TRUTH',\n address: '0xe25f0fe686477f9df3c2876c4902d3b85f75f33a',\n },\n },\n from: '0x0000000000000000000000000000000000000000',\n kind: 'erc1155_sent',\n network_fee: {\n gas_price: '33571446596',\n native_token_price_in_usd: '2038.88',\n },\n },\n tx_hash:\n '0x03381aba290facbaf71c123e263c8dc3dd550aac00ef589cce395182eaeff76f',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock ERC1155 received notification\n *\n * @returns Mock raw ERC1155 received notification\n */\nexport function createMockNotificationERC1155Received(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ERC1155_RECEIVED,\n notification_type: 'on-chain',\n id: 'b6b93c84-e8dc-54ed-9396-7ea50474843a',\n created_at: '2023-11-20T20:44:10.110706Z',\n unread: true,\n payload: {\n block_number: 18615206,\n block_timestamp: '1700510003',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190',\n nft: {\n name: 'IlluminatiNFT DAO',\n image:\n 'https://i.seadn.io/gcs/files/79a77cb37c7b2f1069f752645d29fea7.jpg?w=500&auto=format',\n token_id: '1',\n collection: {\n name: 'IlluminatiNFT DAO',\n image:\n 'https://i.seadn.io/gae/LTKz3om2eCQfn3M6PkqEmY7KhLtdMCOm0QVch2318KJq7-KyToCH7NBTMo4UuJ0AZI-oaBh1HcgrAEIEWYbXY3uMcYpuGXunaXEh?w=500&auto=format',\n symbol: 'TRUTH',\n address: '0xe25f0fe686477f9df3c2876c4902d3b85f75f33a',\n },\n },\n from: '0x0000000000000000000000000000000000000000',\n kind: 'erc1155_received',\n network_fee: {\n gas_price: '33571446596',\n native_token_price_in_usd: '2038.88',\n },\n },\n tx_hash:\n '0x03381aba290facbaf71c123e263c8dc3dd550aac00ef589cce395182eaeff76f',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock MetaMask Swaps notification\n *\n * @returns Mock raw MetaMask Swaps notification\n */\nexport function createMockNotificationMetaMaskSwapsCompleted(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,\n notification_type: 'on-chain',\n id: '7ddfe6a1-ac52-5ffe-aa40-f04242db4b8b',\n created_at: '2023-10-18T13:58:49.854596Z',\n unread: true,\n payload: {\n block_number: 18377666,\n block_timestamp: '1697637275',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'metamask_swap_completed',\n rate: '1558.27',\n token_in: {\n usd: '1576.73',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '9000000000000000',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n name: 'Ethereum',\n },\n token_out: {\n usd: '1.00',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/usdt.svg',\n amount: '14024419',\n symbol: 'USDT',\n address: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n decimals: '6',\n name: 'USDT',\n },\n network_fee: {\n gas_price: '15406129273',\n native_token_price_in_usd: '1576.73',\n },\n },\n tx_hash:\n '0xf69074290f3aa11bce567aabc9ca0df7a12559dfae1b80ba1a124e9dfe19ecc5',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock RocketPool Stake Completed notification\n *\n * @returns Mock raw RocketPool Stake Completed notification\n */\nexport function createMockNotificationRocketPoolStakeCompleted(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,\n notification_type: 'on-chain',\n id: 'c2a2f225-b2fb-5d6c-ba56-e27a5c71ffb9',\n created_at: '2023-11-20T12:02:48.796824Z',\n unread: true,\n payload: {\n block_number: 18585057,\n block_timestamp: '1700145059',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'rocketpool_stake_completed',\n stake_in: {\n usd: '2031.86',\n name: 'Ethereum',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '190690478063438272',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n },\n stake_out: {\n usd: '2226.49',\n name: 'Rocket Pool ETH',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/rETH.svg',\n amount: '175024360778165879',\n symbol: 'RETH',\n address: '0xae78736Cd615f374D3085123A210448E74Fc6393',\n decimals: '18',\n },\n network_fee: {\n gas_price: '36000000000',\n native_token_price_in_usd: '2031.86',\n },\n },\n tx_hash:\n '0xcfc0693bf47995907b0f46ef0644cf16dd9a0de797099b2e00fd481e1b2117d3',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock RocketPool Un-staked notification\n *\n * @returns Mock raw RocketPool Un-staked notification\n */\nexport function createMockNotificationRocketPoolUnStakeCompleted(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,\n notification_type: 'on-chain',\n id: '291ec897-f569-4837-b6c0-21001b198dff',\n created_at: '2023-10-19T13:11:10.623042Z',\n unread: true,\n payload: {\n block_number: 18384336,\n block_timestamp: '1697718011',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'rocketpool_unstake_completed',\n stake_in: {\n usd: '1686.34',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/rETH.svg',\n amount: '66608041413696770',\n symbol: 'RETH',\n address: '0xae78736Cd615f374D3085123A210448E74Fc6393',\n decimals: '18',\n name: 'Rocketpool Eth',\n },\n stake_out: {\n usd: '1553.75',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '72387843427700824',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n name: 'Ethereum',\n },\n network_fee: {\n gas_price: '5656322987',\n native_token_price_in_usd: '1553.75',\n },\n },\n tx_hash:\n '0xc7972a7e409abfc62590ec90e633acd70b9b74e76ad02305be8bf133a0e22d5f',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Lido Stake Completed notification\n *\n * @returns Mock raw Lido Stake Completed notification\n */\nexport function createMockNotificationLidoStakeCompleted(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.LIDO_STAKE_COMPLETED,\n notification_type: 'on-chain',\n id: 'ec10d66a-f78f-461f-83c9-609aada8cc50',\n created_at: '2023-11-02T22:28:49.970865Z',\n unread: true,\n payload: {\n block_number: 18487118,\n block_timestamp: '1698961091',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'lido_stake_completed',\n stake_in: {\n usd: '1806.33',\n name: 'Ethereum',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '330303634023928032',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n },\n stake_out: {\n usd: '1801.30',\n name: 'Liquid staked Ether 2.0',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',\n amount: '330303634023928032',\n symbol: 'STETH',\n address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',\n decimals: '18',\n },\n network_fee: {\n gas_price: '26536359866',\n native_token_price_in_usd: '1806.33',\n },\n },\n tx_hash:\n '0x8cc0fa805f7c3b1743b14f3b91c6b824113b094f26d4ccaf6a71ad8547ce6a0f',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Lido Withdrawal Requested notification\n *\n * @returns Mock raw Lido Withdrawal Requested notification\n */\nexport function createMockNotificationLidoWithdrawalRequested(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,\n notification_type: 'on-chain',\n id: 'ef003925-3379-4ba7-9e2d-8218690cadc9',\n created_at: '2023-10-18T15:04:02.482526Z',\n unread: true,\n payload: {\n block_number: 18377760,\n block_timestamp: '1697638415',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'lido_withdrawal_requested',\n stake_in: {\n usd: '1568.54',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',\n amount: '97180668792218669859',\n symbol: 'STETH',\n address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',\n decimals: '18',\n name: 'Staked Eth',\n },\n stake_out: {\n usd: '1576.73',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '97180668792218669859',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n name: 'Ethereum',\n },\n network_fee: {\n gas_price: '11658906980',\n native_token_price_in_usd: '1576.73',\n },\n },\n tx_hash:\n '0x58b5f82e084cb750ea174e02b20fbdfd2ba8d78053deac787f34fc38e5d427aa',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Lido Withdrawal Completed notification\n *\n * @returns Mock raw Lido Withdrawal Completed notification\n */\nexport function createMockNotificationLidoWithdrawalCompleted(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,\n notification_type: 'on-chain',\n id: 'd73df14d-ce73-4f38-bad3-ab028154042f',\n created_at: '2023-10-18T16:35:03.147606Z',\n unread: true,\n payload: {\n block_number: 18378208,\n block_timestamp: '1697643851',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'lido_withdrawal_completed',\n stake_in: {\n usd: '1570.23',\n image:\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',\n amount: '35081997661451346',\n symbol: 'STETH',\n address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',\n decimals: '18',\n name: 'Staked Eth',\n },\n stake_out: {\n usd: '1571.74',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n amount: '35081997661451346',\n symbol: 'ETH',\n address: '0x0000000000000000000000000000000000000000',\n decimals: '18',\n name: 'Ethereum',\n },\n network_fee: {\n gas_price: '12699495150',\n native_token_price_in_usd: '1571.74',\n },\n },\n tx_hash:\n '0xe6d210d2e601ef3dd1075c48e71452cf35f2daae3886911e964e3babad8ac657',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Lido Withdrawal Ready notification\n *\n * @returns Mock raw Lido Withdrawal Ready notification\n */\nexport function createMockNotificationLidoReadyToBeWithdrawn(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN,\n notification_type: 'on-chain',\n id: 'd73df14d-ce73-4f38-bad3-ab028154042e',\n created_at: '2023-10-18T16:35:03.147606Z',\n unread: true,\n payload: {\n block_number: 18378208,\n block_timestamp: '1697643851',\n chain_id: 1,\n address: '0x881D40237659C251811CEC9c364ef91dC08D300C',\n network: {\n name: 'Ethereum',\n native_symbol: 'ETH',\n block_explorer: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n },\n data: {\n kind: 'lido_stake_ready_to_be_withdrawn',\n request_id: '123456789',\n staked_eth: {\n address: '0x881D40237659C251811CEC9c364ef91dC08D300F',\n symbol: 'ETH',\n name: 'Ethereum',\n amount: '2.5',\n decimals: '18',\n image:\n 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',\n usd: '10000.00',\n },\n },\n tx_hash:\n '0xe6d210d2e601ef3dd1075c48e71452cf35f2daae3886911e964e3babad8ac657',\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - create a mock Generic Platform notification\n *\n * @returns Mock raw Generic Platform notification\n */\nexport function createMockPlatformNotification(): NormalisedAPINotification {\n const mockNotification: NormalisedAPINotification = {\n type: TRIGGER_TYPES.PLATFORM,\n notification_type: 'platform',\n id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',\n unread: true,\n created_at: '2025-10-09T09:45:34.202Z',\n template: {\n image_url:\n 'https://images.ctfassets.net/clixtyxoaeas/4rnpEzy1ATWRKVBOLxZ1Fm/a74dc1eed36d23d7ea6030383a4d5163/MetaMask-icon-fox.svg',\n title: 'This is a Platform Notification!',\n body: 'Teams can now build out their own notifications, and add an optional CTA (like this one below).',\n cta: {\n content: 'Get Started',\n link: 'https://metamask.io/get-started',\n },\n },\n };\n\n return mockNotification;\n}\n\n/**\n * Mocking Utility - creates an array of raw on-chain notifications\n *\n * @returns Array of raw on-chain notifications\n */\nexport function createMockRawOnChainNotifications(): NormalisedAPINotification[] {\n return [1, 2, 3].map((id) => {\n const notification = createMockNotificationEthSent();\n notification.id += `-${id}`;\n return notification;\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mock-snap-notification.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-snap-notification.ts"],"names":[],"mappings":";;;AAAA,sDAA6C;AAG7C;;;;GAIG;AACH,SAAgB,0BAA0B;IACxC,OAAO;QACL,IAAI,EAAE,yBAAa,CAAC,IAAI;QACxB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,OAAO,EAAE,QAAQ;YACjB,MAAM,EAAE,wBAAwB;YAChC,YAAY,EAAE;gBACZ,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,GAAG;gBAChB,UAAU,EAAE;oBACV,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,oBAAoB;iBAC3B;aACF;SACF;KACF,CAAC;AACJ,CAAC;AAjBD,gEAiBC","sourcesContent":["import { TRIGGER_TYPES } from '../constants';\nimport { type RawSnapNotification } from '../types/snaps';\n\n/**\n * Mocking Utility - create a mock raw snap notification\n *\n * @returns Mock Raw Snap Notification\n */\nexport function createMockSnapNotification(): RawSnapNotification {\n return {\n type: TRIGGER_TYPES.SNAP,\n readDate: null,\n data: {\n message: 'fooBar',\n origin: '@metamask/example-snap',\n detailedView: {\n title: 'Detailed View',\n interfaceId: '1',\n footerLink: {\n text: 'Go Home',\n href: 'metamask://client/',\n },\n },\n },\n };\n}\n"]}
1
+ {"version":3,"file":"mock-snap-notification.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-snap-notification.ts"],"names":[],"mappings":";;;AAAA,sDAA6C;AAG7C;;;;GAIG;AACH,SAAgB,0BAA0B;IACxC,OAAO;QACL,IAAI,EAAE,yBAAa,CAAC,IAAI;QACxB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,OAAO,EAAE,QAAQ;YACjB,MAAM,EAAE,wBAAwB;YAChC,YAAY,EAAE;gBACZ,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,GAAG;gBAChB,UAAU,EAAE;oBACV,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,oBAAoB;iBAC3B;aACF;SACF;KACF,CAAC;AACJ,CAAC;AAjBD,gEAiBC","sourcesContent":["import { TRIGGER_TYPES } from '../constants';\nimport type { RawSnapNotification } from '../types/snaps';\n\n/**\n * Mocking Utility - create a mock raw snap notification\n *\n * @returns Mock Raw Snap Notification\n */\nexport function createMockSnapNotification(): RawSnapNotification {\n return {\n type: TRIGGER_TYPES.SNAP,\n readDate: null,\n data: {\n message: 'fooBar',\n origin: '@metamask/example-snap',\n detailedView: {\n title: 'Detailed View',\n interfaceId: '1',\n footerLink: {\n text: 'Go Home',\n href: 'metamask://client/',\n },\n },\n },\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { type RawSnapNotification } from "../types/snaps/index.cjs";
1
+ import type { RawSnapNotification } from "../types/snaps/index.cjs";
2
2
  /**
3
3
  * Mocking Utility - create a mock raw snap notification
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"mock-snap-notification.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-snap-notification.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,iCAAuB;AAE1D;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,mBAAmB,CAiBhE"}
1
+ {"version":3,"file":"mock-snap-notification.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-snap-notification.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iCAAuB;AAE1D;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,mBAAmB,CAiBhE"}
@@ -1,4 +1,4 @@
1
- import { type RawSnapNotification } from "../types/snaps/index.mjs";
1
+ import type { RawSnapNotification } from "../types/snaps/index.mjs";
2
2
  /**
3
3
  * Mocking Utility - create a mock raw snap notification
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"mock-snap-notification.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-snap-notification.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,iCAAuB;AAE1D;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,mBAAmB,CAiBhE"}
1
+ {"version":3,"file":"mock-snap-notification.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-snap-notification.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iCAAuB;AAE1D;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,mBAAmB,CAiBhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"mock-snap-notification.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-snap-notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,+BAAqB;AAG7C;;;;GAIG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,IAAI,EAAE,aAAa,CAAC,IAAI;QACxB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,OAAO,EAAE,QAAQ;YACjB,MAAM,EAAE,wBAAwB;YAChC,YAAY,EAAE;gBACZ,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,GAAG;gBAChB,UAAU,EAAE;oBACV,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,oBAAoB;iBAC3B;aACF;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { TRIGGER_TYPES } from '../constants';\nimport { type RawSnapNotification } from '../types/snaps';\n\n/**\n * Mocking Utility - create a mock raw snap notification\n *\n * @returns Mock Raw Snap Notification\n */\nexport function createMockSnapNotification(): RawSnapNotification {\n return {\n type: TRIGGER_TYPES.SNAP,\n readDate: null,\n data: {\n message: 'fooBar',\n origin: '@metamask/example-snap',\n detailedView: {\n title: 'Detailed View',\n interfaceId: '1',\n footerLink: {\n text: 'Go Home',\n href: 'metamask://client/',\n },\n },\n },\n };\n}\n"]}
1
+ {"version":3,"file":"mock-snap-notification.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mock-snap-notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,+BAAqB;AAG7C;;;;GAIG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,IAAI,EAAE,aAAa,CAAC,IAAI;QACxB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,OAAO,EAAE,QAAQ;YACjB,MAAM,EAAE,wBAAwB;YAChC,YAAY,EAAE;gBACZ,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,GAAG;gBAChB,UAAU,EAAE;oBACV,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,oBAAoB;iBAC3B;aACF;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { TRIGGER_TYPES } from '../constants';\nimport type { RawSnapNotification } from '../types/snaps';\n\n/**\n * Mocking Utility - create a mock raw snap notification\n *\n * @returns Mock Raw Snap Notification\n */\nexport function createMockSnapNotification(): RawSnapNotification {\n return {\n type: TRIGGER_TYPES.SNAP,\n readDate: null,\n data: {\n message: 'fooBar',\n origin: '@metamask/example-snap',\n detailedView: {\n title: 'Detailed View',\n interfaceId: '1',\n footerLink: {\n text: 'Go Home',\n href: 'metamask://client/',\n },\n },\n },\n };\n}\n"]}
@@ -7,6 +7,8 @@ const api_notifications_1 = require("../services/api-notifications.cjs");
7
7
  const feature_announcements_1 = require("../services/feature-announcements.cjs");
8
8
  const perp_notifications_1 = require("../services/perp-notifications.cjs");
9
9
  exports.CONTENTFUL_RESPONSE = (0, mock_feature_announcements_1.createMockFeatureAnnouncementAPIResult)();
10
+ // Using `satisfies` to preserve narrow return types while ensuring type safety; explicit return types would widen to MockResponse
11
+ /* eslint-disable @typescript-eslint/explicit-function-return-type */
10
12
  const getMockFeatureAnnouncementResponse = () => {
11
13
  return {
12
14
  url: feature_announcements_1.FEATURE_ANNOUNCEMENT_API,
@@ -31,7 +33,10 @@ const getMockOnChainNotificationsConfig = () => {
31
33
  };
32
34
  };
33
35
  exports.getMockOnChainNotificationsConfig = getMockOnChainNotificationsConfig;
36
+ /* eslint-enable @typescript-eslint/explicit-function-return-type */
34
37
  exports.MOCK_RAW_ON_CHAIN_NOTIFICATIONS = (0, mock_raw_notifications_1.createMockRawOnChainNotifications)();
38
+ // Using `satisfies` to preserve narrow return types while ensuring type safety; explicit return types would widen to MockResponse
39
+ /* eslint-disable @typescript-eslint/explicit-function-return-type */
35
40
  const getMockListNotificationsResponse = () => {
36
41
  return {
37
42
  url: (0, api_notifications_1.NOTIFICATION_API_LIST_ENDPOINT)(),
@@ -56,4 +61,5 @@ const getMockCreatePerpOrderNotification = () => {
56
61
  };
57
62
  };
58
63
  exports.getMockCreatePerpOrderNotification = getMockCreatePerpOrderNotification;
64
+ /* eslint-enable @typescript-eslint/explicit-function-return-type */
59
65
  //# sourceMappingURL=mockResponses.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mockResponses.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mockResponses.ts"],"names":[],"mappings":";;;AAAA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kC,GAAG,GAAG,EAAE;IACrD,OAAO;QACL,GAAG,EAAE,4CAAuB;QAC5B,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC;AANW,QAAA,kCAAkC,sCAM7C","sourcesContent":["import { createMockFeatureAnnouncementAPIResult } from './mock-feature-announcements';\nimport { createMockRawOnChainNotifications } from './mock-raw-notifications';\nimport {\n NOTIFICATION_API_LIST_ENDPOINT,\n NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT,\n TRIGGER_API_NOTIFICATIONS_ENDPOINT,\n TRIGGER_API_NOTIFICATIONS_QUERY_ENDPOINT,\n} from '../services/api-notifications';\nimport { FEATURE_ANNOUNCEMENT_API } from '../services/feature-announcements';\nimport { PERPS_API_CREATE_ORDERS } from '../services/perp-notifications';\n\ntype MockResponse = {\n url: string;\n requestMethod: 'GET' | 'POST' | 'PUT' | 'DELETE';\n response: unknown;\n};\n\nexport const CONTENTFUL_RESPONSE = createMockFeatureAnnouncementAPIResult();\n\nexport const getMockFeatureAnnouncementResponse = () => {\n return {\n url: FEATURE_ANNOUNCEMENT_API,\n requestMethod: 'GET',\n response: CONTENTFUL_RESPONSE,\n } satisfies MockResponse;\n};\n\nexport const getMockUpdateOnChainNotifications = () => {\n return {\n url: TRIGGER_API_NOTIFICATIONS_ENDPOINT(),\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const getMockOnChainNotificationsConfig = () => {\n return {\n url: TRIGGER_API_NOTIFICATIONS_QUERY_ENDPOINT(),\n requestMethod: 'POST',\n response: [{ address: '0xTestAddress', enabled: true }],\n } satisfies MockResponse;\n};\n\nexport const MOCK_RAW_ON_CHAIN_NOTIFICATIONS =\n createMockRawOnChainNotifications();\n\nexport const getMockListNotificationsResponse = () => {\n return {\n url: NOTIFICATION_API_LIST_ENDPOINT(),\n requestMethod: 'POST',\n response: MOCK_RAW_ON_CHAIN_NOTIFICATIONS,\n } satisfies MockResponse;\n};\n\nexport const getMockMarkNotificationsAsReadResponse = () => {\n return {\n url: NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT(),\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const getMockCreatePerpOrderNotification = () => {\n return {\n url: PERPS_API_CREATE_ORDERS,\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n"]}
1
+ {"version":3,"file":"mockResponses.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mockResponses.ts"],"names":[],"mappings":";;;AAAA,iFAAsF;AACtF,yEAA6E;AAC7E,yEAKuC;AACvC,iFAA6E;AAC7E,2EAAyE;AAQ5D,QAAA,mBAAmB,GAAG,IAAA,mEAAsC,GAAE,CAAC;AAE5E,kIAAkI;AAClI,qEAAqE;AAC9D,MAAM,kCAAkC,GAAG,GAAG,EAAE;IACrD,OAAO;QACL,GAAG,EAAE,gDAAwB;QAC7B,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,2BAAmB;KACP,CAAC;AAC3B,CAAC,CAAC;AANW,QAAA,kCAAkC,sCAM7C;AAEK,MAAM,iCAAiC,GAAG,GAAG,EAAE;IACpD,OAAO;QACL,GAAG,EAAE,IAAA,sDAAkC,GAAE;QACzC,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC;AANW,QAAA,iCAAiC,qCAM5C;AAEK,MAAM,iCAAiC,GAAG,GAAG,EAAE;IACpD,OAAO;QACL,GAAG,EAAE,IAAA,4DAAwC,GAAE;QAC/C,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;KACjC,CAAC;AAC3B,CAAC,CAAC;AANW,QAAA,iCAAiC,qCAM5C;AACF,oEAAoE;AAEvD,QAAA,+BAA+B,GAC1C,IAAA,0DAAiC,GAAE,CAAC;AAEtC,kIAAkI;AAClI,qEAAqE;AAC9D,MAAM,gCAAgC,GAAG,GAAG,EAAE;IACnD,OAAO;QACL,GAAG,EAAE,IAAA,kDAA8B,GAAE;QACrC,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,uCAA+B;KACnB,CAAC;AAC3B,CAAC,CAAC;AANW,QAAA,gCAAgC,oCAM3C;AAEK,MAAM,sCAAsC,GAAG,GAAG,EAAE;IACzD,OAAO;QACL,GAAG,EAAE,IAAA,8DAA0C,GAAE;QACjD,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC;AANW,QAAA,sCAAsC,0CAMjD;AAEK,MAAM,kCAAkC,GAAG,GAAG,EAAE;IACrD,OAAO;QACL,GAAG,EAAE,4CAAuB;QAC5B,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC;AANW,QAAA,kCAAkC,sCAM7C;AACF,oEAAoE","sourcesContent":["import { createMockFeatureAnnouncementAPIResult } from './mock-feature-announcements';\nimport { createMockRawOnChainNotifications } from './mock-raw-notifications';\nimport {\n NOTIFICATION_API_LIST_ENDPOINT,\n NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT,\n TRIGGER_API_NOTIFICATIONS_ENDPOINT,\n TRIGGER_API_NOTIFICATIONS_QUERY_ENDPOINT,\n} from '../services/api-notifications';\nimport { FEATURE_ANNOUNCEMENT_API } from '../services/feature-announcements';\nimport { PERPS_API_CREATE_ORDERS } from '../services/perp-notifications';\n\ntype MockResponse = {\n url: string;\n requestMethod: 'GET' | 'POST' | 'PUT' | 'DELETE';\n response: unknown;\n};\n\nexport const CONTENTFUL_RESPONSE = createMockFeatureAnnouncementAPIResult();\n\n// Using `satisfies` to preserve narrow return types while ensuring type safety; explicit return types would widen to MockResponse\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\nexport const getMockFeatureAnnouncementResponse = () => {\n return {\n url: FEATURE_ANNOUNCEMENT_API,\n requestMethod: 'GET',\n response: CONTENTFUL_RESPONSE,\n } satisfies MockResponse;\n};\n\nexport const getMockUpdateOnChainNotifications = () => {\n return {\n url: TRIGGER_API_NOTIFICATIONS_ENDPOINT(),\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const getMockOnChainNotificationsConfig = () => {\n return {\n url: TRIGGER_API_NOTIFICATIONS_QUERY_ENDPOINT(),\n requestMethod: 'POST',\n response: [{ address: '0xTestAddress', enabled: true }],\n } satisfies MockResponse;\n};\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n\nexport const MOCK_RAW_ON_CHAIN_NOTIFICATIONS =\n createMockRawOnChainNotifications();\n\n// Using `satisfies` to preserve narrow return types while ensuring type safety; explicit return types would widen to MockResponse\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\nexport const getMockListNotificationsResponse = () => {\n return {\n url: NOTIFICATION_API_LIST_ENDPOINT(),\n requestMethod: 'POST',\n response: MOCK_RAW_ON_CHAIN_NOTIFICATIONS,\n } satisfies MockResponse;\n};\n\nexport const getMockMarkNotificationsAsReadResponse = () => {\n return {\n url: NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT(),\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const getMockCreatePerpOrderNotification = () => {\n return {\n url: PERPS_API_CREATE_ORDERS,\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mockResponses.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mockResponses.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,mBAAmB,8DAA2C,CAAC;AAE5E,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;CAM7C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;CAM7C,CAAC;AAEF,eAAO,MAAM,+BAA+B,0CACP,CAAC;AAEtC,eAAO,MAAM,gCAAgC;;;;CAM5C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;;;CAMlD,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC"}
1
+ {"version":3,"file":"mockResponses.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mockResponses.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,mBAAmB,8DAA2C,CAAC;AAI5E,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;CAM7C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;CAM7C,CAAC;AAGF,eAAO,MAAM,+BAA+B,0CACP,CAAC;AAItC,eAAO,MAAM,gCAAgC;;;;CAM5C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;;;CAMlD,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mockResponses.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mockResponses.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,mBAAmB,8DAA2C,CAAC;AAE5E,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;CAM7C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;CAM7C,CAAC;AAEF,eAAO,MAAM,+BAA+B,0CACP,CAAC;AAEtC,eAAO,MAAM,gCAAgC;;;;CAM5C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;;;CAMlD,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC"}
1
+ {"version":3,"file":"mockResponses.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mockResponses.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,mBAAmB,8DAA2C,CAAC;AAI5E,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;CAM7C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;CAM7C,CAAC;AAGF,eAAO,MAAM,+BAA+B,0CACP,CAAC;AAItC,eAAO,MAAM,gCAAgC;;;;CAM5C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;;;CAMlD,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC"}
@@ -4,6 +4,8 @@ import { NOTIFICATION_API_LIST_ENDPOINT, NOTIFICATION_API_MARK_ALL_AS_READ_ENDPO
4
4
  import { FEATURE_ANNOUNCEMENT_API } from "../services/feature-announcements.mjs";
5
5
  import { PERPS_API_CREATE_ORDERS } from "../services/perp-notifications.mjs";
6
6
  export const CONTENTFUL_RESPONSE = createMockFeatureAnnouncementAPIResult();
7
+ // Using `satisfies` to preserve narrow return types while ensuring type safety; explicit return types would widen to MockResponse
8
+ /* eslint-disable @typescript-eslint/explicit-function-return-type */
7
9
  export const getMockFeatureAnnouncementResponse = () => {
8
10
  return {
9
11
  url: FEATURE_ANNOUNCEMENT_API,
@@ -25,7 +27,10 @@ export const getMockOnChainNotificationsConfig = () => {
25
27
  response: [{ address: '0xTestAddress', enabled: true }],
26
28
  };
27
29
  };
30
+ /* eslint-enable @typescript-eslint/explicit-function-return-type */
28
31
  export const MOCK_RAW_ON_CHAIN_NOTIFICATIONS = createMockRawOnChainNotifications();
32
+ // Using `satisfies` to preserve narrow return types while ensuring type safety; explicit return types would widen to MockResponse
33
+ /* eslint-disable @typescript-eslint/explicit-function-return-type */
29
34
  export const getMockListNotificationsResponse = () => {
30
35
  return {
31
36
  url: NOTIFICATION_API_LIST_ENDPOINT(),
@@ -47,4 +52,5 @@ export const getMockCreatePerpOrderNotification = () => {
47
52
  response: null,
48
53
  };
49
54
  };
55
+ /* eslint-enable @typescript-eslint/explicit-function-return-type */
50
56
  //# sourceMappingURL=mockResponses.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mockResponses.mjs","sourceRoot":"","sources":["../../../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OAAO;QACL,GAAG,EAAE,0CAA0C,EAAE;QACjD,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,GAAG,EAAE;IACrD,OAAO;QACL,GAAG,EAAE,uBAAuB;QAC5B,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import { createMockFeatureAnnouncementAPIResult } from './mock-feature-announcements';\nimport { createMockRawOnChainNotifications } from './mock-raw-notifications';\nimport {\n NOTIFICATION_API_LIST_ENDPOINT,\n NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT,\n TRIGGER_API_NOTIFICATIONS_ENDPOINT,\n TRIGGER_API_NOTIFICATIONS_QUERY_ENDPOINT,\n} from '../services/api-notifications';\nimport { FEATURE_ANNOUNCEMENT_API } from '../services/feature-announcements';\nimport { PERPS_API_CREATE_ORDERS } from '../services/perp-notifications';\n\ntype MockResponse = {\n url: string;\n requestMethod: 'GET' | 'POST' | 'PUT' | 'DELETE';\n response: unknown;\n};\n\nexport const CONTENTFUL_RESPONSE = createMockFeatureAnnouncementAPIResult();\n\nexport const getMockFeatureAnnouncementResponse = () => {\n return {\n url: FEATURE_ANNOUNCEMENT_API,\n requestMethod: 'GET',\n response: CONTENTFUL_RESPONSE,\n } satisfies MockResponse;\n};\n\nexport const getMockUpdateOnChainNotifications = () => {\n return {\n url: TRIGGER_API_NOTIFICATIONS_ENDPOINT(),\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const getMockOnChainNotificationsConfig = () => {\n return {\n url: TRIGGER_API_NOTIFICATIONS_QUERY_ENDPOINT(),\n requestMethod: 'POST',\n response: [{ address: '0xTestAddress', enabled: true }],\n } satisfies MockResponse;\n};\n\nexport const MOCK_RAW_ON_CHAIN_NOTIFICATIONS =\n createMockRawOnChainNotifications();\n\nexport const getMockListNotificationsResponse = () => {\n return {\n url: NOTIFICATION_API_LIST_ENDPOINT(),\n requestMethod: 'POST',\n response: MOCK_RAW_ON_CHAIN_NOTIFICATIONS,\n } satisfies MockResponse;\n};\n\nexport const getMockMarkNotificationsAsReadResponse = () => {\n return {\n url: NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT(),\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const getMockCreatePerpOrderNotification = () => {\n return {\n url: PERPS_API_CREATE_ORDERS,\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n"]}
1
+ {"version":3,"file":"mockResponses.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/mocks/mockResponses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,yCAAqC;AACtF,OAAO,EAAE,iCAAiC,EAAE,qCAAiC;AAC7E,OAAO,EACL,8BAA8B,EAC9B,0CAA0C,EAC1C,kCAAkC,EAClC,wCAAwC,EACzC,0CAAsC;AACvC,OAAO,EAAE,wBAAwB,EAAE,8CAA0C;AAC7E,OAAO,EAAE,uBAAuB,EAAE,2CAAuC;AAQzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,sCAAsC,EAAE,CAAC;AAE5E,kIAAkI;AAClI,qEAAqE;AACrE,MAAM,CAAC,MAAM,kCAAkC,GAAG,GAAG,EAAE;IACrD,OAAO;QACL,GAAG,EAAE,wBAAwB;QAC7B,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,mBAAmB;KACP,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,EAAE;IACpD,OAAO;QACL,GAAG,EAAE,kCAAkC,EAAE;QACzC,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,EAAE;IACpD,OAAO;QACL,GAAG,EAAE,wCAAwC,EAAE;QAC/C,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;KACjC,CAAC;AAC3B,CAAC,CAAC;AACF,oEAAoE;AAEpE,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iCAAiC,EAAE,CAAC;AAEtC,kIAAkI;AAClI,qEAAqE;AACrE,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,EAAE;IACnD,OAAO;QACL,GAAG,EAAE,8BAA8B,EAAE;QACrC,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,+BAA+B;KACnB,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,GAAG,EAAE;IACzD,OAAO;QACL,GAAG,EAAE,0CAA0C,EAAE;QACjD,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,GAAG,EAAE;IACrD,OAAO;QACL,GAAG,EAAE,uBAAuB;QAC5B,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC;AACF,oEAAoE","sourcesContent":["import { createMockFeatureAnnouncementAPIResult } from './mock-feature-announcements';\nimport { createMockRawOnChainNotifications } from './mock-raw-notifications';\nimport {\n NOTIFICATION_API_LIST_ENDPOINT,\n NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT,\n TRIGGER_API_NOTIFICATIONS_ENDPOINT,\n TRIGGER_API_NOTIFICATIONS_QUERY_ENDPOINT,\n} from '../services/api-notifications';\nimport { FEATURE_ANNOUNCEMENT_API } from '../services/feature-announcements';\nimport { PERPS_API_CREATE_ORDERS } from '../services/perp-notifications';\n\ntype MockResponse = {\n url: string;\n requestMethod: 'GET' | 'POST' | 'PUT' | 'DELETE';\n response: unknown;\n};\n\nexport const CONTENTFUL_RESPONSE = createMockFeatureAnnouncementAPIResult();\n\n// Using `satisfies` to preserve narrow return types while ensuring type safety; explicit return types would widen to MockResponse\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\nexport const getMockFeatureAnnouncementResponse = () => {\n return {\n url: FEATURE_ANNOUNCEMENT_API,\n requestMethod: 'GET',\n response: CONTENTFUL_RESPONSE,\n } satisfies MockResponse;\n};\n\nexport const getMockUpdateOnChainNotifications = () => {\n return {\n url: TRIGGER_API_NOTIFICATIONS_ENDPOINT(),\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const getMockOnChainNotificationsConfig = () => {\n return {\n url: TRIGGER_API_NOTIFICATIONS_QUERY_ENDPOINT(),\n requestMethod: 'POST',\n response: [{ address: '0xTestAddress', enabled: true }],\n } satisfies MockResponse;\n};\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n\nexport const MOCK_RAW_ON_CHAIN_NOTIFICATIONS =\n createMockRawOnChainNotifications();\n\n// Using `satisfies` to preserve narrow return types while ensuring type safety; explicit return types would widen to MockResponse\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\nexport const getMockListNotificationsResponse = () => {\n return {\n url: NOTIFICATION_API_LIST_ENDPOINT(),\n requestMethod: 'POST',\n response: MOCK_RAW_ON_CHAIN_NOTIFICATIONS,\n } satisfies MockResponse;\n};\n\nexport const getMockMarkNotificationsAsReadResponse = () => {\n return {\n url: NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT(),\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const getMockCreatePerpOrderNotification = () => {\n return {\n url: PERPS_API_CREATE_ORDERS,\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
@@ -5,9 +5,9 @@ const process_api_notifications_1 = require("./process-api-notifications.cjs");
5
5
  const process_feature_announcement_1 = require("./process-feature-announcement.cjs");
6
6
  const process_snap_notifications_1 = require("./process-snap-notifications.cjs");
7
7
  const notification_schema_1 = require("../constants/notification-schema.cjs");
8
- const isOnChainNotification = (n) => notification_schema_1.NOTIFICATION_API_TRIGGER_TYPES_SET.has(n.type);
9
- const isFeatureAnnouncement = (n) => n.type === notification_schema_1.TRIGGER_TYPES.FEATURES_ANNOUNCEMENT;
10
- const isSnapNotification = (n) => n.type === notification_schema_1.TRIGGER_TYPES.SNAP;
8
+ const isOnChainNotification = (notification) => notification_schema_1.NOTIFICATION_API_TRIGGER_TYPES_SET.has(notification.type);
9
+ const isFeatureAnnouncement = (notification) => notification.type === notification_schema_1.TRIGGER_TYPES.FEATURES_ANNOUNCEMENT;
10
+ const isSnapNotification = (notification) => notification.type === notification_schema_1.TRIGGER_TYPES.SNAP;
11
11
  /**
12
12
  * Process feature announcement and wallet notifications into a shared/normalised notification shape.
13
13
  * We can still differentiate notifications by the `type` property
@@ -17,14 +17,14 @@ const isSnapNotification = (n) => n.type === notification_schema_1.TRIGGER_TYPES
17
17
  * @returns a processed notification
18
18
  */
19
19
  function processNotification(notification, readNotifications = []) {
20
- const exhaustedAllCases = (_) => {
20
+ const exhaustedAllCases = (_uncheckedCase) => {
21
21
  const type = notification?.type;
22
22
  throw new Error(`No processor found for notification kind ${type}`);
23
23
  };
24
24
  if (isFeatureAnnouncement(notification)) {
25
- const n = (0, process_feature_announcement_1.processFeatureAnnouncement)(notification);
26
- n.isRead = (0, process_feature_announcement_1.isFeatureAnnouncementRead)(n, readNotifications);
27
- return n;
25
+ const processedNotification = (0, process_feature_announcement_1.processFeatureAnnouncement)(notification);
26
+ processedNotification.isRead = (0, process_feature_announcement_1.isFeatureAnnouncementRead)(processedNotification, readNotifications);
27
+ return processedNotification;
28
28
  }
29
29
  if (isSnapNotification(notification)) {
30
30
  return (0, process_snap_notifications_1.processSnapNotification)(notification);
@@ -52,7 +52,9 @@ function safeProcessNotification(notification, readNotifications = []) {
52
52
  }
53
53
  }
54
54
  exports.safeProcessNotification = safeProcessNotification;
55
- const isNotUndefined = (t) => Boolean(t);
56
- const processAndFilterNotifications = (ns, readIds) => ns.map((n) => safeProcessNotification(n, readIds)).filter(isNotUndefined);
55
+ const isNotUndefined = (item) => Boolean(item);
56
+ const processAndFilterNotifications = (notifications, readIds) => notifications
57
+ .map((notification) => safeProcessNotification(notification, readIds))
58
+ .filter(isNotUndefined);
57
59
  exports.processAndFilterNotifications = processAndFilterNotifications;
58
60
  //# sourceMappingURL=process-notifications.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"process-notifications.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/processors/process-notifications.ts"],"names":[],"mappings":";;;AAAA,+EAAsE;AACtE,qFAGwC;AACxC,iFAAuE;AACvE,8EAG0C;AAS1C,MAAM,qBAAqB,GAAG,CAC5B,CAAuB,EACS,EAAE,CAClC,wDAAkC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAEjD,MAAM,qBAAqB,GAAG,CAC5B,CAAuB,EACkB,EAAE,CAC3C,CAAC,CAAC,IAAI,KAAK,mCAAa,CAAC,qBAAqB,CAAC;AAEjD,MAAM,kBAAkB,GAAG,CACzB,CAAuB,EACG,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,mCAAa,CAAC,IAAI,CAAC;AAE7D;;;;;;;GAOG;AACH,SAAgB,mBAAmB,CACjC,YAAkC,EAClC,oBAA8B,EAAE;IAEhC,MAAM,iBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;QACrC,MAAM,IAAI,GAAW,YAAY,EAAE,IAAI,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,4CAA4C,IAAI,EAAE,CAAC,CAAC;IACtE,CAAC,CAAC;IAEF,IAAI,qBAAqB,CAAC,YAAY,CAAC,EAAE,CAAC;QACxC,MAAM,CAAC,GAAG,IAAA,yDAA0B,EAClC,YAAkD,CACnD,CAAC;QACF,CAAC,CAAC,MAAM,GAAG,IAAA,wDAAyB,EAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAC3D,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAI,kBAAkB,CAAC,YAAY,CAAC,EAAE,CAAC;QACrC,OAAO,IAAA,oDAAuB,EAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,qBAAqB,CAAC,YAAY,CAAC,EAAE,CAAC;QACxC,OAAO,IAAA,mDAAuB,EAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,iBAAiB,CAAC,YAAqB,CAAC,CAAC;AAClD,CAAC;AA1BD,kDA0BC;AAED;;;;;;GAMG;AACH,SAAgB,uBAAuB,CACrC,YAAkC,EAClC,oBAA8B,EAAE;IAEhC,IAAI,CAAC;QACH,MAAM,qBAAqB,GAAG,mBAAmB,CAC/C,YAAY,EACZ,iBAAiB,CAClB,CAAC;QACF,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAbD,0DAaC;AAED,MAAM,cAAc,GAAG,CAAO,CAAQ,EAAa,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC1D,MAAM,6BAA6B,GAAG,CAC3C,EAA0B,EAC1B,OAAiB,EACjB,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAHlE,QAAA,6BAA6B,iCAGqC","sourcesContent":["import { processAPINotifications } from './process-api-notifications';\nimport {\n isFeatureAnnouncementRead,\n processFeatureAnnouncement,\n} from './process-feature-announcement';\nimport { processSnapNotification } from './process-snap-notifications';\nimport {\n TRIGGER_TYPES,\n NOTIFICATION_API_TRIGGER_TYPES_SET,\n} from '../constants/notification-schema';\nimport type { FeatureAnnouncementRawNotification } from '../types/feature-announcement/feature-announcement';\nimport type {\n INotification,\n RawNotificationUnion,\n} from '../types/notification/notification';\nimport type { NormalisedAPINotification } from '../types/notification-api/notification-api';\nimport type { RawSnapNotification } from '../types/snaps';\n\nconst isOnChainNotification = (\n n: RawNotificationUnion,\n): n is NormalisedAPINotification =>\n NOTIFICATION_API_TRIGGER_TYPES_SET.has(n.type);\n\nconst isFeatureAnnouncement = (\n n: RawNotificationUnion,\n): n is FeatureAnnouncementRawNotification =>\n n.type === TRIGGER_TYPES.FEATURES_ANNOUNCEMENT;\n\nconst isSnapNotification = (\n n: RawNotificationUnion,\n): n is RawSnapNotification => n.type === TRIGGER_TYPES.SNAP;\n\n/**\n * Process feature announcement and wallet notifications into a shared/normalised notification shape.\n * We can still differentiate notifications by the `type` property\n *\n * @param notification - a feature announcement or on chain notification\n * @param readNotifications - all read notifications currently\n * @returns a processed notification\n */\nexport function processNotification(\n notification: RawNotificationUnion,\n readNotifications: string[] = [],\n): INotification {\n const exhaustedAllCases = (_: never) => {\n const type: string = notification?.type;\n throw new Error(`No processor found for notification kind ${type}`);\n };\n\n if (isFeatureAnnouncement(notification)) {\n const n = processFeatureAnnouncement(\n notification as FeatureAnnouncementRawNotification,\n );\n n.isRead = isFeatureAnnouncementRead(n, readNotifications);\n return n;\n }\n\n if (isSnapNotification(notification)) {\n return processSnapNotification(notification);\n }\n\n if (isOnChainNotification(notification)) {\n return processAPINotifications(notification);\n }\n\n return exhaustedAllCases(notification as never);\n}\n\n/**\n * Safe version of processing a notification. Rather than throwing an error if failed to process, it will return the Notification or undefined\n *\n * @param notification - notification to processes\n * @param readNotifications - all read notifications currently\n * @returns a process notification or undefined if failed to process\n */\nexport function safeProcessNotification(\n notification: RawNotificationUnion,\n readNotifications: string[] = [],\n): INotification | undefined {\n try {\n const processedNotification = processNotification(\n notification,\n readNotifications,\n );\n return processedNotification;\n } catch {\n return undefined;\n }\n}\n\nconst isNotUndefined = <Item>(t?: Item): t is Item => Boolean(t);\nexport const processAndFilterNotifications = (\n ns: RawNotificationUnion[],\n readIds: string[],\n) => ns.map((n) => safeProcessNotification(n, readIds)).filter(isNotUndefined);\n"]}
1
+ {"version":3,"file":"process-notifications.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/processors/process-notifications.ts"],"names":[],"mappings":";;;AAAA,+EAAsE;AACtE,qFAGwC;AACxC,iFAAuE;AACvE,8EAG0C;AAS1C,MAAM,qBAAqB,GAAG,CAC5B,YAAkC,EACS,EAAE,CAC7C,wDAAkC,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;AAE5D,MAAM,qBAAqB,GAAG,CAC5B,YAAkC,EACkB,EAAE,CACtD,YAAY,CAAC,IAAI,KAAK,mCAAa,CAAC,qBAAqB,CAAC;AAE5D,MAAM,kBAAkB,GAAG,CACzB,YAAkC,EACG,EAAE,CACvC,YAAY,CAAC,IAAI,KAAK,mCAAa,CAAC,IAAI,CAAC;AAE3C;;;;;;;GAOG;AACH,SAAgB,mBAAmB,CACjC,YAAkC,EAClC,oBAA8B,EAAE;IAEhC,MAAM,iBAAiB,GAAG,CAAC,cAAqB,EAAS,EAAE;QACzD,MAAM,IAAI,GAAW,YAAY,EAAE,IAAI,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,4CAA4C,IAAI,EAAE,CAAC,CAAC;IACtE,CAAC,CAAC;IAEF,IAAI,qBAAqB,CAAC,YAAY,CAAC,EAAE,CAAC;QACxC,MAAM,qBAAqB,GAAG,IAAA,yDAA0B,EAAC,YAAY,CAAC,CAAC;QACvE,qBAAqB,CAAC,MAAM,GAAG,IAAA,wDAAyB,EACtD,qBAAqB,EACrB,iBAAiB,CAClB,CAAC;QACF,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IAED,IAAI,kBAAkB,CAAC,YAAY,CAAC,EAAE,CAAC;QACrC,OAAO,IAAA,oDAAuB,EAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,qBAAqB,CAAC,YAAY,CAAC,EAAE,CAAC;QACxC,OAAO,IAAA,mDAAuB,EAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,iBAAiB,CAAC,YAAY,CAAC,CAAC;AACzC,CAAC;AA3BD,kDA2BC;AAED;;;;;;GAMG;AACH,SAAgB,uBAAuB,CACrC,YAAkC,EAClC,oBAA8B,EAAE;IAEhC,IAAI,CAAC;QACH,MAAM,qBAAqB,GAAG,mBAAmB,CAC/C,YAAY,EACZ,iBAAiB,CAClB,CAAC;QACF,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAbD,0DAaC;AAED,MAAM,cAAc,GAAG,CAAO,IAAW,EAAgB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACnE,MAAM,6BAA6B,GAAG,CAC3C,aAAqC,EACrC,OAAiB,EACA,EAAE,CACnB,aAAa;KACV,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,uBAAuB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;KACrE,MAAM,CAAC,cAAc,CAAC,CAAC;AANf,QAAA,6BAA6B,iCAMd","sourcesContent":["import { processAPINotifications } from './process-api-notifications';\nimport {\n isFeatureAnnouncementRead,\n processFeatureAnnouncement,\n} from './process-feature-announcement';\nimport { processSnapNotification } from './process-snap-notifications';\nimport {\n TRIGGER_TYPES,\n NOTIFICATION_API_TRIGGER_TYPES_SET,\n} from '../constants/notification-schema';\nimport type { FeatureAnnouncementRawNotification } from '../types/feature-announcement/feature-announcement';\nimport type {\n INotification,\n RawNotificationUnion,\n} from '../types/notification/notification';\nimport type { NormalisedAPINotification } from '../types/notification-api/notification-api';\nimport type { RawSnapNotification } from '../types/snaps';\n\nconst isOnChainNotification = (\n notification: RawNotificationUnion,\n): notification is NormalisedAPINotification =>\n NOTIFICATION_API_TRIGGER_TYPES_SET.has(notification.type);\n\nconst isFeatureAnnouncement = (\n notification: RawNotificationUnion,\n): notification is FeatureAnnouncementRawNotification =>\n notification.type === TRIGGER_TYPES.FEATURES_ANNOUNCEMENT;\n\nconst isSnapNotification = (\n notification: RawNotificationUnion,\n): notification is RawSnapNotification =>\n notification.type === TRIGGER_TYPES.SNAP;\n\n/**\n * Process feature announcement and wallet notifications into a shared/normalised notification shape.\n * We can still differentiate notifications by the `type` property\n *\n * @param notification - a feature announcement or on chain notification\n * @param readNotifications - all read notifications currently\n * @returns a processed notification\n */\nexport function processNotification(\n notification: RawNotificationUnion,\n readNotifications: string[] = [],\n): INotification {\n const exhaustedAllCases = (_uncheckedCase: never): never => {\n const type: string = notification?.type;\n throw new Error(`No processor found for notification kind ${type}`);\n };\n\n if (isFeatureAnnouncement(notification)) {\n const processedNotification = processFeatureAnnouncement(notification);\n processedNotification.isRead = isFeatureAnnouncementRead(\n processedNotification,\n readNotifications,\n );\n return processedNotification;\n }\n\n if (isSnapNotification(notification)) {\n return processSnapNotification(notification);\n }\n\n if (isOnChainNotification(notification)) {\n return processAPINotifications(notification);\n }\n\n return exhaustedAllCases(notification);\n}\n\n/**\n * Safe version of processing a notification. Rather than throwing an error if failed to process, it will return the Notification or undefined\n *\n * @param notification - notification to processes\n * @param readNotifications - all read notifications currently\n * @returns a process notification or undefined if failed to process\n */\nexport function safeProcessNotification(\n notification: RawNotificationUnion,\n readNotifications: string[] = [],\n): INotification | undefined {\n try {\n const processedNotification = processNotification(\n notification,\n readNotifications,\n );\n return processedNotification;\n } catch {\n return undefined;\n }\n}\n\nconst isNotUndefined = <Item>(item?: Item): item is Item => Boolean(item);\nexport const processAndFilterNotifications = (\n notifications: RawNotificationUnion[],\n readIds: string[],\n): INotification[] =>\n notifications\n .map((notification) => safeProcessNotification(notification, readIds))\n .filter(isNotUndefined);\n"]}