@metamask/notification-services-controller 19.0.0 → 21.0.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 (227) hide show
  1. package/CHANGELOG.md +36 -2
  2. package/dist/NotificationServicesController/NotificationServicesController.cjs +20 -38
  3. package/dist/NotificationServicesController/NotificationServicesController.cjs.map +1 -1
  4. package/dist/NotificationServicesController/NotificationServicesController.d.cts +5 -2
  5. package/dist/NotificationServicesController/NotificationServicesController.d.cts.map +1 -1
  6. package/dist/NotificationServicesController/NotificationServicesController.d.mts +5 -2
  7. package/dist/NotificationServicesController/NotificationServicesController.d.mts.map +1 -1
  8. package/dist/NotificationServicesController/NotificationServicesController.mjs +20 -15
  9. package/dist/NotificationServicesController/NotificationServicesController.mjs.map +1 -1
  10. package/dist/NotificationServicesController/constants/notification-schema.cjs +4 -14
  11. package/dist/NotificationServicesController/constants/notification-schema.cjs.map +1 -1
  12. package/dist/NotificationServicesController/constants/notification-schema.d.cts +3 -13
  13. package/dist/NotificationServicesController/constants/notification-schema.d.cts.map +1 -1
  14. package/dist/NotificationServicesController/constants/notification-schema.d.mts +3 -13
  15. package/dist/NotificationServicesController/constants/notification-schema.d.mts.map +1 -1
  16. package/dist/NotificationServicesController/constants/notification-schema.mjs +3 -13
  17. package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -1
  18. package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs +427 -529
  19. package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs.map +1 -1
  20. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.cts +20 -50
  21. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.cts.map +1 -1
  22. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.mts +20 -50
  23. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.mts.map +1 -1
  24. package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs +424 -521
  25. package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs.map +1 -1
  26. package/dist/NotificationServicesController/mocks/mockResponses.cjs +5 -5
  27. package/dist/NotificationServicesController/mocks/mockResponses.cjs.map +1 -1
  28. package/dist/NotificationServicesController/mocks/mockResponses.d.cts +2 -2
  29. package/dist/NotificationServicesController/mocks/mockResponses.d.cts.map +1 -1
  30. package/dist/NotificationServicesController/mocks/mockResponses.d.mts +2 -2
  31. package/dist/NotificationServicesController/mocks/mockResponses.d.mts.map +1 -1
  32. package/dist/NotificationServicesController/mocks/mockResponses.mjs +5 -5
  33. package/dist/NotificationServicesController/mocks/mockResponses.mjs.map +1 -1
  34. package/dist/NotificationServicesController/processors/index.cjs +1 -1
  35. package/dist/NotificationServicesController/processors/index.cjs.map +1 -1
  36. package/dist/NotificationServicesController/processors/index.d.cts +1 -1
  37. package/dist/NotificationServicesController/processors/index.d.cts.map +1 -1
  38. package/dist/NotificationServicesController/processors/index.d.mts +1 -1
  39. package/dist/NotificationServicesController/processors/index.d.mts.map +1 -1
  40. package/dist/NotificationServicesController/processors/index.mjs +1 -1
  41. package/dist/NotificationServicesController/processors/index.mjs.map +1 -1
  42. package/dist/NotificationServicesController/processors/process-api-notifications.cjs +22 -0
  43. package/dist/NotificationServicesController/processors/process-api-notifications.cjs.map +1 -0
  44. package/dist/NotificationServicesController/processors/process-api-notifications.d.cts +10 -0
  45. package/dist/NotificationServicesController/processors/process-api-notifications.d.cts.map +1 -0
  46. package/dist/NotificationServicesController/processors/process-api-notifications.d.mts +10 -0
  47. package/dist/NotificationServicesController/processors/process-api-notifications.d.mts.map +1 -0
  48. package/dist/NotificationServicesController/processors/process-api-notifications.mjs +18 -0
  49. package/dist/NotificationServicesController/processors/process-api-notifications.mjs.map +1 -0
  50. package/dist/NotificationServicesController/processors/process-feature-announcement.cjs +2 -7
  51. package/dist/NotificationServicesController/processors/process-feature-announcement.cjs.map +1 -1
  52. package/dist/NotificationServicesController/processors/process-feature-announcement.d.cts.map +1 -1
  53. package/dist/NotificationServicesController/processors/process-feature-announcement.d.mts.map +1 -1
  54. package/dist/NotificationServicesController/processors/process-feature-announcement.mjs +1 -6
  55. package/dist/NotificationServicesController/processors/process-feature-announcement.mjs.map +1 -1
  56. package/dist/NotificationServicesController/processors/process-notifications.cjs +3 -3
  57. package/dist/NotificationServicesController/processors/process-notifications.cjs.map +1 -1
  58. package/dist/NotificationServicesController/processors/process-notifications.d.cts +398 -458
  59. package/dist/NotificationServicesController/processors/process-notifications.d.cts.map +1 -1
  60. package/dist/NotificationServicesController/processors/process-notifications.d.mts +398 -458
  61. package/dist/NotificationServicesController/processors/process-notifications.d.mts.map +1 -1
  62. package/dist/NotificationServicesController/processors/process-notifications.mjs +4 -4
  63. package/dist/NotificationServicesController/processors/process-notifications.mjs.map +1 -1
  64. package/dist/NotificationServicesController/services/{onchain-notifications.cjs → api-notifications.cjs} +57 -24
  65. package/dist/NotificationServicesController/services/api-notifications.cjs.map +1 -0
  66. package/dist/NotificationServicesController/services/{onchain-notifications.d.cts → api-notifications.d.cts} +20 -13
  67. package/dist/NotificationServicesController/services/api-notifications.d.cts.map +1 -0
  68. package/dist/NotificationServicesController/services/{onchain-notifications.d.mts → api-notifications.d.mts} +20 -13
  69. package/dist/NotificationServicesController/services/api-notifications.d.mts.map +1 -0
  70. package/dist/NotificationServicesController/services/{onchain-notifications.mjs → api-notifications.mjs} +49 -22
  71. package/dist/NotificationServicesController/services/api-notifications.mjs.map +1 -0
  72. package/dist/NotificationServicesController/services/feature-announcements.cjs.map +1 -1
  73. package/dist/NotificationServicesController/services/feature-announcements.mjs.map +1 -1
  74. package/dist/NotificationServicesController/services/notification-config-cache.cjs.map +1 -1
  75. package/dist/NotificationServicesController/services/notification-config-cache.mjs.map +1 -1
  76. package/dist/NotificationServicesController/services/perp-notifications.cjs +0 -1
  77. package/dist/NotificationServicesController/services/perp-notifications.cjs.map +1 -1
  78. package/dist/NotificationServicesController/services/perp-notifications.d.cts.map +1 -1
  79. package/dist/NotificationServicesController/services/perp-notifications.d.mts.map +1 -1
  80. package/dist/NotificationServicesController/services/perp-notifications.mjs +0 -1
  81. package/dist/NotificationServicesController/services/perp-notifications.mjs.map +1 -1
  82. package/dist/NotificationServicesController/types/index.cjs.map +1 -1
  83. package/dist/NotificationServicesController/types/index.d.cts +1 -1
  84. package/dist/NotificationServicesController/types/index.d.cts.map +1 -1
  85. package/dist/NotificationServicesController/types/index.d.mts +1 -1
  86. package/dist/NotificationServicesController/types/index.d.mts.map +1 -1
  87. package/dist/NotificationServicesController/types/index.mjs.map +1 -1
  88. package/dist/NotificationServicesController/types/notification/notification.cjs.map +1 -1
  89. package/dist/NotificationServicesController/types/notification/notification.d.cts +3 -11
  90. package/dist/NotificationServicesController/types/notification/notification.d.cts.map +1 -1
  91. package/dist/NotificationServicesController/types/notification/notification.d.mts +3 -11
  92. package/dist/NotificationServicesController/types/notification/notification.d.mts.map +1 -1
  93. package/dist/NotificationServicesController/types/notification/notification.mjs.map +1 -1
  94. package/dist/NotificationServicesController/types/notification-api/index.cjs.map +1 -0
  95. package/dist/NotificationServicesController/types/notification-api/index.d.cts +3 -0
  96. package/dist/NotificationServicesController/types/notification-api/index.d.cts.map +1 -0
  97. package/dist/NotificationServicesController/types/notification-api/index.d.mts +3 -0
  98. package/dist/NotificationServicesController/types/notification-api/index.d.mts.map +1 -0
  99. package/dist/NotificationServicesController/types/notification-api/index.mjs.map +1 -0
  100. package/dist/NotificationServicesController/types/{on-chain-notification/on-chain-notification.cjs → notification-api/notification-api.cjs} +1 -1
  101. package/dist/NotificationServicesController/types/notification-api/notification-api.cjs.map +1 -0
  102. package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts +64 -0
  103. package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts.map +1 -0
  104. package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts +64 -0
  105. package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts.map +1 -0
  106. package/dist/NotificationServicesController/types/notification-api/notification-api.mjs +2 -0
  107. package/dist/NotificationServicesController/types/notification-api/notification-api.mjs.map +1 -0
  108. package/dist/NotificationServicesController/types/notification-api/schema.cjs +4 -0
  109. package/dist/NotificationServicesController/types/notification-api/schema.cjs.map +1 -0
  110. package/dist/NotificationServicesController/types/notification-api/schema.d.cts +365 -0
  111. package/dist/NotificationServicesController/types/notification-api/schema.d.cts.map +1 -0
  112. package/dist/NotificationServicesController/types/notification-api/schema.d.mts +365 -0
  113. package/dist/NotificationServicesController/types/notification-api/schema.d.mts.map +1 -0
  114. package/dist/NotificationServicesController/types/notification-api/schema.mjs +3 -0
  115. package/dist/NotificationServicesController/types/notification-api/schema.mjs.map +1 -0
  116. package/dist/NotificationServicesController/ui/constants.d.cts +27 -27
  117. package/dist/NotificationServicesController/ui/constants.d.mts +27 -27
  118. package/dist/NotificationServicesController/utils/isVersionInBounds.cjs.map +1 -1
  119. package/dist/NotificationServicesController/utils/isVersionInBounds.mjs.map +1 -1
  120. package/dist/NotificationServicesController/utils/should-auto-expire.cjs +12 -0
  121. package/dist/NotificationServicesController/utils/should-auto-expire.cjs.map +1 -0
  122. package/dist/NotificationServicesController/utils/should-auto-expire.d.cts +2 -0
  123. package/dist/NotificationServicesController/utils/should-auto-expire.d.cts.map +1 -0
  124. package/dist/NotificationServicesController/utils/should-auto-expire.d.mts +2 -0
  125. package/dist/NotificationServicesController/utils/should-auto-expire.d.mts.map +1 -0
  126. package/dist/NotificationServicesController/utils/should-auto-expire.mjs +8 -0
  127. package/dist/NotificationServicesController/utils/should-auto-expire.mjs.map +1 -0
  128. package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs +2 -0
  129. package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs.map +1 -1
  130. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts +2 -0
  131. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts.map +1 -1
  132. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts +2 -0
  133. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts.map +1 -1
  134. package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +2 -0
  135. package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs.map +1 -1
  136. package/dist/NotificationServicesPushController/mocks/mockResponse.cjs +1 -1
  137. package/dist/NotificationServicesPushController/mocks/mockResponse.cjs.map +1 -1
  138. package/dist/NotificationServicesPushController/mocks/mockResponse.mjs +1 -1
  139. package/dist/NotificationServicesPushController/mocks/mockResponse.mjs.map +1 -1
  140. package/dist/NotificationServicesPushController/services/endpoints.cjs +10 -3
  141. package/dist/NotificationServicesPushController/services/endpoints.cjs.map +1 -1
  142. package/dist/NotificationServicesPushController/services/endpoints.d.cts +3 -1
  143. package/dist/NotificationServicesPushController/services/endpoints.d.cts.map +1 -1
  144. package/dist/NotificationServicesPushController/services/endpoints.d.mts +3 -1
  145. package/dist/NotificationServicesPushController/services/endpoints.d.mts.map +1 -1
  146. package/dist/NotificationServicesPushController/services/endpoints.mjs +7 -2
  147. package/dist/NotificationServicesPushController/services/endpoints.mjs.map +1 -1
  148. package/dist/NotificationServicesPushController/services/push/push-web.cjs +5 -2
  149. package/dist/NotificationServicesPushController/services/push/push-web.cjs.map +1 -1
  150. package/dist/NotificationServicesPushController/services/push/push-web.d.cts.map +1 -1
  151. package/dist/NotificationServicesPushController/services/push/push-web.d.mts.map +1 -1
  152. package/dist/NotificationServicesPushController/services/push/push-web.mjs +6 -3
  153. package/dist/NotificationServicesPushController/services/push/push-web.mjs.map +1 -1
  154. package/dist/NotificationServicesPushController/services/services.cjs +2 -1
  155. package/dist/NotificationServicesPushController/services/services.cjs.map +1 -1
  156. package/dist/NotificationServicesPushController/services/services.d.cts +3 -0
  157. package/dist/NotificationServicesPushController/services/services.d.cts.map +1 -1
  158. package/dist/NotificationServicesPushController/services/services.d.mts +3 -0
  159. package/dist/NotificationServicesPushController/services/services.d.mts.map +1 -1
  160. package/dist/NotificationServicesPushController/services/services.mjs +2 -1
  161. package/dist/NotificationServicesPushController/services/services.mjs.map +1 -1
  162. package/dist/NotificationServicesPushController/utils/get-notification-data.cjs.map +1 -1
  163. package/dist/NotificationServicesPushController/utils/get-notification-data.mjs.map +1 -1
  164. package/dist/NotificationServicesPushController/utils/get-notification-message.cjs +51 -43
  165. package/dist/NotificationServicesPushController/utils/get-notification-message.cjs.map +1 -1
  166. package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts +4 -2
  167. package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts.map +1 -1
  168. package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts +4 -2
  169. package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts.map +1 -1
  170. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +51 -43
  171. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs.map +1 -1
  172. package/dist/NotificationServicesPushController/web/push-utils.cjs +5 -2
  173. package/dist/NotificationServicesPushController/web/push-utils.cjs.map +1 -1
  174. package/dist/NotificationServicesPushController/web/push-utils.d.cts.map +1 -1
  175. package/dist/NotificationServicesPushController/web/push-utils.d.mts.map +1 -1
  176. package/dist/NotificationServicesPushController/web/push-utils.mjs +6 -3
  177. package/dist/NotificationServicesPushController/web/push-utils.mjs.map +1 -1
  178. package/dist/shared/is-onchain-notification.cjs +1 -2
  179. package/dist/shared/is-onchain-notification.cjs.map +1 -1
  180. package/dist/shared/is-onchain-notification.d.cts.map +1 -1
  181. package/dist/shared/is-onchain-notification.d.mts.map +1 -1
  182. package/dist/shared/is-onchain-notification.mjs +1 -2
  183. package/dist/shared/is-onchain-notification.mjs.map +1 -1
  184. package/dist/shared/to-raw-notification.cjs +22 -6
  185. package/dist/shared/to-raw-notification.cjs.map +1 -1
  186. package/dist/shared/to-raw-notification.d.cts +2 -2
  187. package/dist/shared/to-raw-notification.d.cts.map +1 -1
  188. package/dist/shared/to-raw-notification.d.mts +2 -2
  189. package/dist/shared/to-raw-notification.d.mts.map +1 -1
  190. package/dist/shared/to-raw-notification.mjs +20 -4
  191. package/dist/shared/to-raw-notification.mjs.map +1 -1
  192. package/package.json +9 -7
  193. package/dist/NotificationServicesController/processors/process-onchain-notifications.cjs +0 -19
  194. package/dist/NotificationServicesController/processors/process-onchain-notifications.cjs.map +0 -1
  195. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.cts +0 -10
  196. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.cts.map +0 -1
  197. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.mts +0 -10
  198. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.mts.map +0 -1
  199. package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs +0 -15
  200. package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs.map +0 -1
  201. package/dist/NotificationServicesController/services/onchain-notifications.cjs.map +0 -1
  202. package/dist/NotificationServicesController/services/onchain-notifications.d.cts.map +0 -1
  203. package/dist/NotificationServicesController/services/onchain-notifications.d.mts.map +0 -1
  204. package/dist/NotificationServicesController/services/onchain-notifications.mjs.map +0 -1
  205. package/dist/NotificationServicesController/types/on-chain-notification/index.cjs.map +0 -1
  206. package/dist/NotificationServicesController/types/on-chain-notification/index.d.cts +0 -2
  207. package/dist/NotificationServicesController/types/on-chain-notification/index.d.cts.map +0 -1
  208. package/dist/NotificationServicesController/types/on-chain-notification/index.d.mts +0 -2
  209. package/dist/NotificationServicesController/types/on-chain-notification/index.d.mts.map +0 -1
  210. package/dist/NotificationServicesController/types/on-chain-notification/index.mjs.map +0 -1
  211. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.cjs.map +0 -1
  212. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts +0 -49
  213. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts.map +0 -1
  214. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts +0 -49
  215. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts.map +0 -1
  216. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs +0 -2
  217. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs.map +0 -1
  218. package/dist/NotificationServicesController/types/on-chain-notification/schema.cjs +0 -10
  219. package/dist/NotificationServicesController/types/on-chain-notification/schema.cjs.map +0 -1
  220. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.cts +0 -681
  221. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.cts.map +0 -1
  222. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts +0 -681
  223. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts.map +0 -1
  224. package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs +0 -9
  225. package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs.map +0 -1
  226. /package/dist/NotificationServicesController/types/{on-chain-notification → notification-api}/index.cjs +0 -0
  227. /package/dist/NotificationServicesController/types/{on-chain-notification → notification-api}/index.mjs +0 -0
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createMockRawOnChainNotifications = exports.createMockNotificationSparkFiHealthFactor = exports.createMockNotificationRocketpoolStakingRewards = exports.createMockNotificationNotionalLoanExpiration = exports.createMockNotificationLidoStakingRewards = exports.createMockNotificationEnsExpiration = exports.createMockNotificationAaveV3HealthFactor = exports.createMockNotificationLidoReadyToBeWithdrawn = exports.createMockNotificationLidoWithdrawalCompleted = exports.createMockNotificationLidoWithdrawalRequested = exports.createMockNotificationLidoStakeCompleted = exports.createMockNotificationRocketPoolUnStakeCompleted = exports.createMockNotificationRocketPoolStakeCompleted = exports.createMockNotificationMetaMaskSwapsCompleted = exports.createMockNotificationERC1155Received = exports.createMockNotificationERC1155Sent = exports.createMockNotificationERC721Received = exports.createMockNotificationERC721Sent = exports.createMockNotificationERC20Received = exports.createMockNotificationERC20Sent = exports.createMockNotificationEthReceived = exports.createMockNotificationEthSent = void 0;
3
+ exports.createMockRawOnChainNotifications = exports.createMockPlatformNotification = exports.createMockNotificationLidoReadyToBeWithdrawn = exports.createMockNotificationLidoWithdrawalCompleted = exports.createMockNotificationLidoWithdrawalRequested = exports.createMockNotificationLidoStakeCompleted = exports.createMockNotificationRocketPoolUnStakeCompleted = exports.createMockNotificationRocketPoolStakeCompleted = exports.createMockNotificationMetaMaskSwapsCompleted = exports.createMockNotificationERC1155Received = exports.createMockNotificationERC1155Sent = exports.createMockNotificationERC721Received = exports.createMockNotificationERC721Sent = exports.createMockNotificationERC20Received = exports.createMockNotificationERC20Sent = exports.createMockNotificationEthReceived = exports.createMockNotificationEthSent = void 0;
4
4
  const notification_schema_1 = require("../constants/notification-schema.cjs");
5
5
  /**
6
6
  * Mocking Utility - create a mock Eth sent notification
@@ -10,26 +10,28 @@ const notification_schema_1 = require("../constants/notification-schema.cjs");
10
10
  function createMockNotificationEthSent() {
11
11
  const mockNotification = {
12
12
  type: notification_schema_1.TRIGGER_TYPES.ETH_SENT,
13
+ notification_type: 'on-chain',
13
14
  id: '3fa85f64-5717-4562-b3fc-2c963f66afa7',
14
- trigger_id: '3fa85f64-5717-4562-b3fc-2c963f66afa7',
15
- chain_id: 1,
16
- block_number: 17485840,
17
- block_timestamp: '2022-03-01T00:00:00Z',
18
- tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
19
15
  unread: true,
20
16
  created_at: '2022-03-01T00:00:00Z',
21
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
22
- data: {
23
- kind: 'eth_sent',
24
- network_fee: {
25
- gas_price: '207806259583',
26
- native_token_price_in_usd: '0.83',
27
- },
28
- from: '0x881D40237659C251811CEC9c364ef91dC08D300C',
29
- to: '0x881D40237659C251811CEC9c364ef91dC08D300D',
30
- amount: {
31
- usd: '670.64',
32
- eth: '0.005',
17
+ payload: {
18
+ chain_id: 1,
19
+ block_number: 17485840,
20
+ block_timestamp: '2022-03-01T00:00:00Z',
21
+ tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
22
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
23
+ data: {
24
+ kind: 'eth_sent',
25
+ network_fee: {
26
+ gas_price: '207806259583',
27
+ native_token_price_in_usd: '0.83',
28
+ },
29
+ from: '0x881D40237659C251811CEC9c364ef91dC08D300C',
30
+ to: '0x881D40237659C251811CEC9c364ef91dC08D300D',
31
+ amount: {
32
+ usd: '670.64',
33
+ eth: '0.005',
34
+ },
33
35
  },
34
36
  },
35
37
  };
@@ -44,26 +46,28 @@ exports.createMockNotificationEthSent = createMockNotificationEthSent;
44
46
  function createMockNotificationEthReceived() {
45
47
  const mockNotification = {
46
48
  type: notification_schema_1.TRIGGER_TYPES.ETH_RECEIVED,
49
+ notification_type: 'on-chain',
47
50
  id: '3fa85f64-5717-4562-b3fc-2c963f66afa8',
48
- trigger_id: '3fa85f64-5717-4562-b3fc-2c963f66afa8',
49
- chain_id: 1,
50
- block_number: 17485840,
51
- block_timestamp: '2022-03-01T00:00:00Z',
52
- tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
53
51
  unread: true,
54
52
  created_at: '2022-03-01T00:00:00Z',
55
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
56
- data: {
57
- kind: 'eth_received',
58
- network_fee: {
59
- gas_price: '207806259583',
60
- native_token_price_in_usd: '0.83',
61
- },
62
- from: '0x881D40237659C251811CEC9c364ef91dC08D300C',
63
- to: '0x881D40237659C251811CEC9c364ef91dC08D300D',
64
- amount: {
65
- usd: '670.64',
66
- eth: '808.000000000000000000',
53
+ payload: {
54
+ chain_id: 1,
55
+ block_number: 17485840,
56
+ block_timestamp: '2022-03-01T00:00:00Z',
57
+ tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
58
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
59
+ data: {
60
+ kind: 'eth_received',
61
+ network_fee: {
62
+ gas_price: '207806259583',
63
+ native_token_price_in_usd: '0.83',
64
+ },
65
+ from: '0x881D40237659C251811CEC9c364ef91dC08D300C',
66
+ to: '0x881D40237659C251811CEC9c364ef91dC08D300D',
67
+ amount: {
68
+ usd: '670.64',
69
+ eth: '808.000000000000000000',
70
+ },
67
71
  },
68
72
  },
69
73
  };
@@ -78,31 +82,33 @@ exports.createMockNotificationEthReceived = createMockNotificationEthReceived;
78
82
  function createMockNotificationERC20Sent() {
79
83
  const mockNotification = {
80
84
  type: notification_schema_1.TRIGGER_TYPES.ERC20_SENT,
85
+ notification_type: 'on-chain',
81
86
  id: '3fa85f64-5717-4562-b3fc-2c963f66afa9',
82
- trigger_id: '3fa85f64-5717-4562-b3fc-2c963f66afa9',
83
- chain_id: 1,
84
- block_number: 17485840,
85
- block_timestamp: '2022-03-01T00:00:00Z',
86
- tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
87
87
  unread: true,
88
88
  created_at: '2022-03-01T00:00:00Z',
89
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
90
- data: {
91
- kind: 'erc20_sent',
92
- network_fee: {
93
- gas_price: '207806259583',
94
- native_token_price_in_usd: '0.83',
95
- },
96
- to: '0xecc19e177d24551aa7ed6bc6fe566eca726cc8a9',
97
- from: '0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae',
98
- token: {
99
- usd: '1.00',
100
- name: 'USDC',
101
- image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/usdc.svg',
102
- amount: '4956250000',
103
- symbol: 'USDC',
104
- address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
105
- decimals: '6',
89
+ payload: {
90
+ chain_id: 1,
91
+ block_number: 17485840,
92
+ block_timestamp: '2022-03-01T00:00:00Z',
93
+ tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
94
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
95
+ data: {
96
+ kind: 'erc20_sent',
97
+ network_fee: {
98
+ gas_price: '207806259583',
99
+ native_token_price_in_usd: '0.83',
100
+ },
101
+ to: '0xecc19e177d24551aa7ed6bc6fe566eca726cc8a9',
102
+ from: '0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae',
103
+ token: {
104
+ usd: '1.00',
105
+ name: 'USDC',
106
+ image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/usdc.svg',
107
+ amount: '4956250000',
108
+ symbol: 'USDC',
109
+ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
110
+ decimals: '6',
111
+ },
106
112
  },
107
113
  },
108
114
  };
@@ -117,31 +123,33 @@ exports.createMockNotificationERC20Sent = createMockNotificationERC20Sent;
117
123
  function createMockNotificationERC20Received() {
118
124
  const mockNotification = {
119
125
  type: notification_schema_1.TRIGGER_TYPES.ERC20_RECEIVED,
126
+ notification_type: 'on-chain',
120
127
  id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
121
- trigger_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
122
- chain_id: 1,
123
- block_number: 17485840,
124
- block_timestamp: '2022-03-01T00:00:00Z',
125
- tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
126
128
  unread: true,
127
129
  created_at: '2022-03-01T00:00:00Z',
128
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
129
- data: {
130
- kind: 'erc20_received',
131
- network_fee: {
132
- gas_price: '207806259583',
133
- native_token_price_in_usd: '0.83',
134
- },
135
- to: '0xeae7380dd4cef6fbd1144f49e4d1e6964258a4f4',
136
- from: '0x51c72848c68a965f66fa7a88855f9f7784502a7f',
137
- token: {
138
- usd: '0.00',
139
- name: 'SHIBA INU',
140
- image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/shib.svg',
141
- amount: '8382798736999999457296646144',
142
- symbol: 'SHIB',
143
- address: '0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce',
144
- decimals: '18',
130
+ payload: {
131
+ chain_id: 1,
132
+ block_number: 17485840,
133
+ block_timestamp: '2022-03-01T00:00:00Z',
134
+ tx_hash: '0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6',
135
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
136
+ data: {
137
+ kind: 'erc20_received',
138
+ network_fee: {
139
+ gas_price: '207806259583',
140
+ native_token_price_in_usd: '0.83',
141
+ },
142
+ to: '0xeae7380dd4cef6fbd1144f49e4d1e6964258a4f4',
143
+ from: '0x51c72848c68a965f66fa7a88855f9f7784502a7f',
144
+ token: {
145
+ usd: '0.00',
146
+ name: 'SHIBA INU',
147
+ image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/shib.svg',
148
+ amount: '8382798736999999457296646144',
149
+ symbol: 'SHIB',
150
+ address: '0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce',
151
+ decimals: '18',
152
+ },
145
153
  },
146
154
  },
147
155
  };
@@ -156,35 +164,37 @@ exports.createMockNotificationERC20Received = createMockNotificationERC20Receive
156
164
  function createMockNotificationERC721Sent() {
157
165
  const mockNotification = {
158
166
  type: notification_schema_1.TRIGGER_TYPES.ERC721_SENT,
159
- block_number: 18576643,
160
- block_timestamp: '1700043467',
161
- chain_id: 1,
167
+ notification_type: 'on-chain',
168
+ id: 'a4193058-9814-537e-9df4-79dcac727fb6',
162
169
  created_at: '2023-11-15T11:08:17.895407Z',
163
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
164
- data: {
165
- to: '0xf47f628fe3bd2595e9ab384bfffc3859b448e451',
166
- nft: {
167
- name: 'Captainz #8680',
168
- image: 'https://i.seadn.io/s/raw/files/ae0fc06714ff7fb40217340d8a242c0e.gif?w=500&auto=format',
169
- token_id: '8680',
170
- collection: {
171
- name: 'The Captainz',
172
- image: 'https://i.seadn.io/gcs/files/6df4d75778066bce740050615bc84e21.png?w=500&auto=format',
173
- symbol: 'Captainz',
174
- address: '0x769272677fab02575e84945f03eca517acc544cc',
170
+ unread: true,
171
+ payload: {
172
+ block_number: 18576643,
173
+ block_timestamp: '1700043467',
174
+ chain_id: 1,
175
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
176
+ data: {
177
+ to: '0xf47f628fe3bd2595e9ab384bfffc3859b448e451',
178
+ nft: {
179
+ name: 'Captainz #8680',
180
+ image: 'https://i.seadn.io/s/raw/files/ae0fc06714ff7fb40217340d8a242c0e.gif?w=500&auto=format',
181
+ token_id: '8680',
182
+ collection: {
183
+ name: 'The Captainz',
184
+ image: 'https://i.seadn.io/gcs/files/6df4d75778066bce740050615bc84e21.png?w=500&auto=format',
185
+ symbol: 'Captainz',
186
+ address: '0x769272677fab02575e84945f03eca517acc544cc',
187
+ },
188
+ },
189
+ from: '0x24a0bb54b7e7a8e406e9b28058a9fd6c49e6df4f',
190
+ kind: 'erc721_sent',
191
+ network_fee: {
192
+ gas_price: '24550653274',
193
+ native_token_price_in_usd: '1986.61',
175
194
  },
176
195
  },
177
- from: '0x24a0bb54b7e7a8e406e9b28058a9fd6c49e6df4f',
178
- kind: 'erc721_sent',
179
- network_fee: {
180
- gas_price: '24550653274',
181
- native_token_price_in_usd: '1986.61',
182
- },
196
+ tx_hash: '0x0833c69fb41cf972a0f031fceca242939bc3fcf82b964b74606649abcad371bd',
183
197
  },
184
- id: 'a4193058-9814-537e-9df4-79dcac727fb6',
185
- trigger_id: '028485be-b994-422b-a93b-03fcc01ab715',
186
- tx_hash: '0x0833c69fb41cf972a0f031fceca242939bc3fcf82b964b74606649abcad371bd',
187
- unread: true,
188
198
  };
189
199
  return mockNotification;
190
200
  }
@@ -197,35 +207,37 @@ exports.createMockNotificationERC721Sent = createMockNotificationERC721Sent;
197
207
  function createMockNotificationERC721Received() {
198
208
  const mockNotification = {
199
209
  type: notification_schema_1.TRIGGER_TYPES.ERC721_RECEIVED,
200
- block_number: 18571446,
201
- block_timestamp: '1699980623',
202
- chain_id: 1,
210
+ notification_type: 'on-chain',
211
+ id: '00a79d24-befa-57ed-a55a-9eb8696e1654',
203
212
  created_at: '2023-11-14T17:40:52.319281Z',
204
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
205
- data: {
206
- to: '0xba7f3daa8adfdad686574406ab9bd5d2f0a49d2e',
207
- nft: {
208
- name: 'The Plague #2722',
209
- image: 'https://i.seadn.io/s/raw/files/a96f90ec8ebf55a2300c66a0c46d6a16.png?w=500&auto=format',
210
- token_id: '2722',
211
- collection: {
212
- name: 'The Plague NFT',
213
- image: 'https://i.seadn.io/gcs/files/4577987a5ca45ca5118b2e31559ee4d1.jpg?w=500&auto=format',
214
- symbol: 'FROG',
215
- address: '0xc379e535caff250a01caa6c3724ed1359fe5c29b',
213
+ unread: true,
214
+ payload: {
215
+ block_number: 18571446,
216
+ block_timestamp: '1699980623',
217
+ chain_id: 1,
218
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
219
+ data: {
220
+ to: '0xba7f3daa8adfdad686574406ab9bd5d2f0a49d2e',
221
+ nft: {
222
+ name: 'The Plague #2722',
223
+ image: 'https://i.seadn.io/s/raw/files/a96f90ec8ebf55a2300c66a0c46d6a16.png?w=500&auto=format',
224
+ token_id: '2722',
225
+ collection: {
226
+ name: 'The Plague NFT',
227
+ image: 'https://i.seadn.io/gcs/files/4577987a5ca45ca5118b2e31559ee4d1.jpg?w=500&auto=format',
228
+ symbol: 'FROG',
229
+ address: '0xc379e535caff250a01caa6c3724ed1359fe5c29b',
230
+ },
231
+ },
232
+ from: '0x24a0bb54b7e7a8e406e9b28058a9fd6c49e6df4f',
233
+ kind: 'erc721_received',
234
+ network_fee: {
235
+ gas_price: '53701898538',
236
+ native_token_price_in_usd: '2047.01',
216
237
  },
217
238
  },
218
- from: '0x24a0bb54b7e7a8e406e9b28058a9fd6c49e6df4f',
219
- kind: 'erc721_received',
220
- network_fee: {
221
- gas_price: '53701898538',
222
- native_token_price_in_usd: '2047.01',
223
- },
239
+ tx_hash: '0xe554c9e29e6eeca8ba94da4d047334ba08b8eb9ca3b801dd69cec08dfdd4ae43',
224
240
  },
225
- id: '00a79d24-befa-57ed-a55a-9eb8696e1654',
226
- trigger_id: 'd24ac26a-8579-49ec-9947-d04d63592ebd',
227
- tx_hash: '0xe554c9e29e6eeca8ba94da4d047334ba08b8eb9ca3b801dd69cec08dfdd4ae43',
228
- unread: true,
229
241
  };
230
242
  return mockNotification;
231
243
  }
@@ -238,35 +250,37 @@ exports.createMockNotificationERC721Received = createMockNotificationERC721Recei
238
250
  function createMockNotificationERC1155Sent() {
239
251
  const mockNotification = {
240
252
  type: notification_schema_1.TRIGGER_TYPES.ERC1155_SENT,
241
- block_number: 18615206,
242
- block_timestamp: '1700510003',
243
- chain_id: 1,
253
+ notification_type: 'on-chain',
254
+ id: 'a09ff9d1-623a-52ab-a3d4-c7c8c9a58362',
244
255
  created_at: '2023-11-20T20:44:10.110706Z',
245
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
246
- data: {
247
- to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190',
248
- nft: {
249
- name: 'IlluminatiNFT DAO',
250
- image: 'https://i.seadn.io/gcs/files/79a77cb37c7b2f1069f752645d29fea7.jpg?w=500&auto=format',
251
- token_id: '1',
252
- collection: {
256
+ unread: true,
257
+ payload: {
258
+ block_number: 18615206,
259
+ block_timestamp: '1700510003',
260
+ chain_id: 1,
261
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
262
+ data: {
263
+ to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190',
264
+ nft: {
253
265
  name: 'IlluminatiNFT DAO',
254
- image: 'https://i.seadn.io/gae/LTKz3om2eCQfn3M6PkqEmY7KhLtdMCOm0QVch2318KJq7-KyToCH7NBTMo4UuJ0AZI-oaBh1HcgrAEIEWYbXY3uMcYpuGXunaXEh?w=500&auto=format',
255
- symbol: 'TRUTH',
256
- address: '0xe25f0fe686477f9df3c2876c4902d3b85f75f33a',
266
+ image: 'https://i.seadn.io/gcs/files/79a77cb37c7b2f1069f752645d29fea7.jpg?w=500&auto=format',
267
+ token_id: '1',
268
+ collection: {
269
+ name: 'IlluminatiNFT DAO',
270
+ image: 'https://i.seadn.io/gae/LTKz3om2eCQfn3M6PkqEmY7KhLtdMCOm0QVch2318KJq7-KyToCH7NBTMo4UuJ0AZI-oaBh1HcgrAEIEWYbXY3uMcYpuGXunaXEh?w=500&auto=format',
271
+ symbol: 'TRUTH',
272
+ address: '0xe25f0fe686477f9df3c2876c4902d3b85f75f33a',
273
+ },
274
+ },
275
+ from: '0x0000000000000000000000000000000000000000',
276
+ kind: 'erc1155_sent',
277
+ network_fee: {
278
+ gas_price: '33571446596',
279
+ native_token_price_in_usd: '2038.88',
257
280
  },
258
281
  },
259
- from: '0x0000000000000000000000000000000000000000',
260
- kind: 'erc1155_sent',
261
- network_fee: {
262
- gas_price: '33571446596',
263
- native_token_price_in_usd: '2038.88',
264
- },
282
+ tx_hash: '0x03381aba290facbaf71c123e263c8dc3dd550aac00ef589cce395182eaeff76f',
265
283
  },
266
- id: 'a09ff9d1-623a-52ab-a3d4-c7c8c9a58362',
267
- trigger_id: 'e2130f7d-78b8-4c34-999a-3f3d3bb5b03c',
268
- tx_hash: '0x03381aba290facbaf71c123e263c8dc3dd550aac00ef589cce395182eaeff76f',
269
- unread: true,
270
284
  };
271
285
  return mockNotification;
272
286
  }
@@ -279,35 +293,37 @@ exports.createMockNotificationERC1155Sent = createMockNotificationERC1155Sent;
279
293
  function createMockNotificationERC1155Received() {
280
294
  const mockNotification = {
281
295
  type: notification_schema_1.TRIGGER_TYPES.ERC1155_RECEIVED,
282
- block_number: 18615206,
283
- block_timestamp: '1700510003',
284
- chain_id: 1,
296
+ notification_type: 'on-chain',
297
+ id: 'b6b93c84-e8dc-54ed-9396-7ea50474843a',
285
298
  created_at: '2023-11-20T20:44:10.110706Z',
286
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
287
- data: {
288
- to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190',
289
- nft: {
290
- name: 'IlluminatiNFT DAO',
291
- image: 'https://i.seadn.io/gcs/files/79a77cb37c7b2f1069f752645d29fea7.jpg?w=500&auto=format',
292
- token_id: '1',
293
- collection: {
299
+ unread: true,
300
+ payload: {
301
+ block_number: 18615206,
302
+ block_timestamp: '1700510003',
303
+ chain_id: 1,
304
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
305
+ data: {
306
+ to: '0x15bd77ccacf2da39b84f0c31fee2e451225bb190',
307
+ nft: {
294
308
  name: 'IlluminatiNFT DAO',
295
- image: 'https://i.seadn.io/gae/LTKz3om2eCQfn3M6PkqEmY7KhLtdMCOm0QVch2318KJq7-KyToCH7NBTMo4UuJ0AZI-oaBh1HcgrAEIEWYbXY3uMcYpuGXunaXEh?w=500&auto=format',
296
- symbol: 'TRUTH',
297
- address: '0xe25f0fe686477f9df3c2876c4902d3b85f75f33a',
309
+ image: 'https://i.seadn.io/gcs/files/79a77cb37c7b2f1069f752645d29fea7.jpg?w=500&auto=format',
310
+ token_id: '1',
311
+ collection: {
312
+ name: 'IlluminatiNFT DAO',
313
+ image: 'https://i.seadn.io/gae/LTKz3om2eCQfn3M6PkqEmY7KhLtdMCOm0QVch2318KJq7-KyToCH7NBTMo4UuJ0AZI-oaBh1HcgrAEIEWYbXY3uMcYpuGXunaXEh?w=500&auto=format',
314
+ symbol: 'TRUTH',
315
+ address: '0xe25f0fe686477f9df3c2876c4902d3b85f75f33a',
316
+ },
317
+ },
318
+ from: '0x0000000000000000000000000000000000000000',
319
+ kind: 'erc1155_received',
320
+ network_fee: {
321
+ gas_price: '33571446596',
322
+ native_token_price_in_usd: '2038.88',
298
323
  },
299
324
  },
300
- from: '0x0000000000000000000000000000000000000000',
301
- kind: 'erc1155_received',
302
- network_fee: {
303
- gas_price: '33571446596',
304
- native_token_price_in_usd: '2038.88',
305
- },
325
+ tx_hash: '0x03381aba290facbaf71c123e263c8dc3dd550aac00ef589cce395182eaeff76f',
306
326
  },
307
- id: 'b6b93c84-e8dc-54ed-9396-7ea50474843a',
308
- trigger_id: '710c8abb-43a9-42a5-9d86-9dd258726c82',
309
- tx_hash: '0x03381aba290facbaf71c123e263c8dc3dd550aac00ef589cce395182eaeff76f',
310
- unread: true,
311
327
  };
312
328
  return mockNotification;
313
329
  }
@@ -320,41 +336,43 @@ exports.createMockNotificationERC1155Received = createMockNotificationERC1155Rec
320
336
  function createMockNotificationMetaMaskSwapsCompleted() {
321
337
  const mockNotification = {
322
338
  type: notification_schema_1.TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,
323
- block_number: 18377666,
324
- block_timestamp: '1697637275',
325
- chain_id: 1,
339
+ notification_type: 'on-chain',
340
+ id: '7ddfe6a1-ac52-5ffe-aa40-f04242db4b8b',
326
341
  created_at: '2023-10-18T13:58:49.854596Z',
327
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
328
- data: {
329
- kind: 'metamask_swap_completed',
330
- rate: '1558.27',
331
- token_in: {
332
- usd: '1576.73',
333
- image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
334
- amount: '9000000000000000',
335
- symbol: 'ETH',
336
- address: '0x0000000000000000000000000000000000000000',
337
- decimals: '18',
338
- name: 'Ethereum',
339
- },
340
- token_out: {
341
- usd: '1.00',
342
- image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/usdt.svg',
343
- amount: '14024419',
344
- symbol: 'USDT',
345
- address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
346
- decimals: '6',
347
- name: 'USDT',
348
- },
349
- network_fee: {
350
- gas_price: '15406129273',
351
- native_token_price_in_usd: '1576.73',
342
+ unread: true,
343
+ payload: {
344
+ block_number: 18377666,
345
+ block_timestamp: '1697637275',
346
+ chain_id: 1,
347
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
348
+ data: {
349
+ kind: 'metamask_swap_completed',
350
+ rate: '1558.27',
351
+ token_in: {
352
+ usd: '1576.73',
353
+ image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
354
+ amount: '9000000000000000',
355
+ symbol: 'ETH',
356
+ address: '0x0000000000000000000000000000000000000000',
357
+ decimals: '18',
358
+ name: 'Ethereum',
359
+ },
360
+ token_out: {
361
+ usd: '1.00',
362
+ image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/usdt.svg',
363
+ amount: '14024419',
364
+ symbol: 'USDT',
365
+ address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
366
+ decimals: '6',
367
+ name: 'USDT',
368
+ },
369
+ network_fee: {
370
+ gas_price: '15406129273',
371
+ native_token_price_in_usd: '1576.73',
372
+ },
352
373
  },
374
+ tx_hash: '0xf69074290f3aa11bce567aabc9ca0df7a12559dfae1b80ba1a124e9dfe19ecc5',
353
375
  },
354
- id: '7ddfe6a1-ac52-5ffe-aa40-f04242db4b8b',
355
- trigger_id: 'd2eaa2eb-2e6e-4fd5-8763-b70ea571b46c',
356
- tx_hash: '0xf69074290f3aa11bce567aabc9ca0df7a12559dfae1b80ba1a124e9dfe19ecc5',
357
- unread: true,
358
376
  };
359
377
  return mockNotification;
360
378
  }
@@ -367,40 +385,42 @@ exports.createMockNotificationMetaMaskSwapsCompleted = createMockNotificationMet
367
385
  function createMockNotificationRocketPoolStakeCompleted() {
368
386
  const mockNotification = {
369
387
  type: notification_schema_1.TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,
370
- block_number: 18585057,
371
- block_timestamp: '1700145059',
372
- chain_id: 1,
388
+ notification_type: 'on-chain',
389
+ id: 'c2a2f225-b2fb-5d6c-ba56-e27a5c71ffb9',
373
390
  created_at: '2023-11-20T12:02:48.796824Z',
374
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
375
- data: {
376
- kind: 'rocketpool_stake_completed',
377
- stake_in: {
378
- usd: '2031.86',
379
- name: 'Ethereum',
380
- image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
381
- amount: '190690478063438272',
382
- symbol: 'ETH',
383
- address: '0x0000000000000000000000000000000000000000',
384
- decimals: '18',
385
- },
386
- stake_out: {
387
- usd: '2226.49',
388
- name: 'Rocket Pool ETH',
389
- image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/rETH.svg',
390
- amount: '175024360778165879',
391
- symbol: 'RETH',
392
- address: '0xae78736Cd615f374D3085123A210448E74Fc6393',
393
- decimals: '18',
394
- },
395
- network_fee: {
396
- gas_price: '36000000000',
397
- native_token_price_in_usd: '2031.86',
391
+ unread: true,
392
+ payload: {
393
+ block_number: 18585057,
394
+ block_timestamp: '1700145059',
395
+ chain_id: 1,
396
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
397
+ data: {
398
+ kind: 'rocketpool_stake_completed',
399
+ stake_in: {
400
+ usd: '2031.86',
401
+ name: 'Ethereum',
402
+ image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
403
+ amount: '190690478063438272',
404
+ symbol: 'ETH',
405
+ address: '0x0000000000000000000000000000000000000000',
406
+ decimals: '18',
407
+ },
408
+ stake_out: {
409
+ usd: '2226.49',
410
+ name: 'Rocket Pool ETH',
411
+ image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/rETH.svg',
412
+ amount: '175024360778165879',
413
+ symbol: 'RETH',
414
+ address: '0xae78736Cd615f374D3085123A210448E74Fc6393',
415
+ decimals: '18',
416
+ },
417
+ network_fee: {
418
+ gas_price: '36000000000',
419
+ native_token_price_in_usd: '2031.86',
420
+ },
398
421
  },
422
+ tx_hash: '0xcfc0693bf47995907b0f46ef0644cf16dd9a0de797099b2e00fd481e1b2117d3',
399
423
  },
400
- id: 'c2a2f225-b2fb-5d6c-ba56-e27a5c71ffb9',
401
- trigger_id: '5110ff97-acff-40c0-83b4-11d487b8c7b0',
402
- tx_hash: '0xcfc0693bf47995907b0f46ef0644cf16dd9a0de797099b2e00fd481e1b2117d3',
403
- unread: true,
404
424
  };
405
425
  return mockNotification;
406
426
  }
@@ -413,40 +433,42 @@ exports.createMockNotificationRocketPoolStakeCompleted = createMockNotificationR
413
433
  function createMockNotificationRocketPoolUnStakeCompleted() {
414
434
  const mockNotification = {
415
435
  type: notification_schema_1.TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,
416
- block_number: 18384336,
417
- block_timestamp: '1697718011',
418
- chain_id: 1,
436
+ notification_type: 'on-chain',
437
+ id: '291ec897-f569-4837-b6c0-21001b198dff',
419
438
  created_at: '2023-10-19T13:11:10.623042Z',
420
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
421
- data: {
422
- kind: 'rocketpool_unstake_completed',
423
- stake_in: {
424
- usd: '1686.34',
425
- image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/rETH.svg',
426
- amount: '66608041413696770',
427
- symbol: 'RETH',
428
- address: '0xae78736Cd615f374D3085123A210448E74Fc6393',
429
- decimals: '18',
430
- name: 'Rocketpool Eth',
431
- },
432
- stake_out: {
433
- usd: '1553.75',
434
- image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
435
- amount: '72387843427700824',
436
- symbol: 'ETH',
437
- address: '0x0000000000000000000000000000000000000000',
438
- decimals: '18',
439
- name: 'Ethereum',
440
- },
441
- network_fee: {
442
- gas_price: '5656322987',
443
- native_token_price_in_usd: '1553.75',
439
+ unread: true,
440
+ payload: {
441
+ block_number: 18384336,
442
+ block_timestamp: '1697718011',
443
+ chain_id: 1,
444
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
445
+ data: {
446
+ kind: 'rocketpool_unstake_completed',
447
+ stake_in: {
448
+ usd: '1686.34',
449
+ image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/rETH.svg',
450
+ amount: '66608041413696770',
451
+ symbol: 'RETH',
452
+ address: '0xae78736Cd615f374D3085123A210448E74Fc6393',
453
+ decimals: '18',
454
+ name: 'Rocketpool Eth',
455
+ },
456
+ stake_out: {
457
+ usd: '1553.75',
458
+ image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
459
+ amount: '72387843427700824',
460
+ symbol: 'ETH',
461
+ address: '0x0000000000000000000000000000000000000000',
462
+ decimals: '18',
463
+ name: 'Ethereum',
464
+ },
465
+ network_fee: {
466
+ gas_price: '5656322987',
467
+ native_token_price_in_usd: '1553.75',
468
+ },
444
469
  },
470
+ tx_hash: '0xc7972a7e409abfc62590ec90e633acd70b9b74e76ad02305be8bf133a0e22d5f',
445
471
  },
446
- id: '291ec897-f569-4837-b6c0-21001b198dff',
447
- trigger_id: '291ec897-f569-4837-b6c0-21001b198dff',
448
- tx_hash: '0xc7972a7e409abfc62590ec90e633acd70b9b74e76ad02305be8bf133a0e22d5f',
449
- unread: true,
450
472
  };
451
473
  return mockNotification;
452
474
  }
@@ -459,40 +481,42 @@ exports.createMockNotificationRocketPoolUnStakeCompleted = createMockNotificatio
459
481
  function createMockNotificationLidoStakeCompleted() {
460
482
  const mockNotification = {
461
483
  type: notification_schema_1.TRIGGER_TYPES.LIDO_STAKE_COMPLETED,
462
- block_number: 18487118,
463
- block_timestamp: '1698961091',
464
- chain_id: 1,
484
+ notification_type: 'on-chain',
485
+ id: 'ec10d66a-f78f-461f-83c9-609aada8cc50',
465
486
  created_at: '2023-11-02T22:28:49.970865Z',
466
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
467
- data: {
468
- kind: 'lido_stake_completed',
469
- stake_in: {
470
- usd: '1806.33',
471
- name: 'Ethereum',
472
- image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
473
- amount: '330303634023928032',
474
- symbol: 'ETH',
475
- address: '0x0000000000000000000000000000000000000000',
476
- decimals: '18',
477
- },
478
- stake_out: {
479
- usd: '1801.30',
480
- name: 'Liquid staked Ether 2.0',
481
- image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',
482
- amount: '330303634023928032',
483
- symbol: 'STETH',
484
- address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',
485
- decimals: '18',
486
- },
487
- network_fee: {
488
- gas_price: '26536359866',
489
- native_token_price_in_usd: '1806.33',
487
+ unread: true,
488
+ payload: {
489
+ block_number: 18487118,
490
+ block_timestamp: '1698961091',
491
+ chain_id: 1,
492
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
493
+ data: {
494
+ kind: 'lido_stake_completed',
495
+ stake_in: {
496
+ usd: '1806.33',
497
+ name: 'Ethereum',
498
+ image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
499
+ amount: '330303634023928032',
500
+ symbol: 'ETH',
501
+ address: '0x0000000000000000000000000000000000000000',
502
+ decimals: '18',
503
+ },
504
+ stake_out: {
505
+ usd: '1801.30',
506
+ name: 'Liquid staked Ether 2.0',
507
+ image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',
508
+ amount: '330303634023928032',
509
+ symbol: 'STETH',
510
+ address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',
511
+ decimals: '18',
512
+ },
513
+ network_fee: {
514
+ gas_price: '26536359866',
515
+ native_token_price_in_usd: '1806.33',
516
+ },
490
517
  },
518
+ tx_hash: '0x8cc0fa805f7c3b1743b14f3b91c6b824113b094f26d4ccaf6a71ad8547ce6a0f',
491
519
  },
492
- id: 'ec10d66a-f78f-461f-83c9-609aada8cc50',
493
- trigger_id: 'ec10d66a-f78f-461f-83c9-609aada8cc50',
494
- tx_hash: '0x8cc0fa805f7c3b1743b14f3b91c6b824113b094f26d4ccaf6a71ad8547ce6a0f',
495
- unread: true,
496
520
  };
497
521
  return mockNotification;
498
522
  }
@@ -505,40 +529,42 @@ exports.createMockNotificationLidoStakeCompleted = createMockNotificationLidoSta
505
529
  function createMockNotificationLidoWithdrawalRequested() {
506
530
  const mockNotification = {
507
531
  type: notification_schema_1.TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,
508
- block_number: 18377760,
509
- block_timestamp: '1697638415',
510
- chain_id: 1,
532
+ notification_type: 'on-chain',
533
+ id: 'ef003925-3379-4ba7-9e2d-8218690cadc9',
511
534
  created_at: '2023-10-18T15:04:02.482526Z',
512
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
513
- data: {
514
- kind: 'lido_withdrawal_requested',
515
- stake_in: {
516
- usd: '1568.54',
517
- image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',
518
- amount: '97180668792218669859',
519
- symbol: 'STETH',
520
- address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',
521
- decimals: '18',
522
- name: 'Staked Eth',
523
- },
524
- stake_out: {
525
- usd: '1576.73',
526
- image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
527
- amount: '97180668792218669859',
528
- symbol: 'ETH',
529
- address: '0x0000000000000000000000000000000000000000',
530
- decimals: '18',
531
- name: 'Ethereum',
532
- },
533
- network_fee: {
534
- gas_price: '11658906980',
535
- native_token_price_in_usd: '1576.73',
535
+ unread: true,
536
+ payload: {
537
+ block_number: 18377760,
538
+ block_timestamp: '1697638415',
539
+ chain_id: 1,
540
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
541
+ data: {
542
+ kind: 'lido_withdrawal_requested',
543
+ stake_in: {
544
+ usd: '1568.54',
545
+ image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',
546
+ amount: '97180668792218669859',
547
+ symbol: 'STETH',
548
+ address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',
549
+ decimals: '18',
550
+ name: 'Staked Eth',
551
+ },
552
+ stake_out: {
553
+ usd: '1576.73',
554
+ image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
555
+ amount: '97180668792218669859',
556
+ symbol: 'ETH',
557
+ address: '0x0000000000000000000000000000000000000000',
558
+ decimals: '18',
559
+ name: 'Ethereum',
560
+ },
561
+ network_fee: {
562
+ gas_price: '11658906980',
563
+ native_token_price_in_usd: '1576.73',
564
+ },
536
565
  },
566
+ tx_hash: '0x58b5f82e084cb750ea174e02b20fbdfd2ba8d78053deac787f34fc38e5d427aa',
537
567
  },
538
- id: 'ef003925-3379-4ba7-9e2d-8218690cadc9',
539
- trigger_id: 'ef003925-3379-4ba7-9e2d-8218690cadc9',
540
- tx_hash: '0x58b5f82e084cb750ea174e02b20fbdfd2ba8d78053deac787f34fc38e5d427aa',
541
- unread: true,
542
568
  };
543
569
  return mockNotification;
544
570
  }
@@ -551,40 +577,42 @@ exports.createMockNotificationLidoWithdrawalRequested = createMockNotificationLi
551
577
  function createMockNotificationLidoWithdrawalCompleted() {
552
578
  const mockNotification = {
553
579
  type: notification_schema_1.TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,
554
- block_number: 18378208,
555
- block_timestamp: '1697643851',
556
- chain_id: 1,
580
+ notification_type: 'on-chain',
581
+ id: 'd73df14d-ce73-4f38-bad3-ab028154042f',
557
582
  created_at: '2023-10-18T16:35:03.147606Z',
558
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
559
- data: {
560
- kind: 'lido_withdrawal_completed',
561
- stake_in: {
562
- usd: '1570.23',
563
- image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',
564
- amount: '35081997661451346',
565
- symbol: 'STETH',
566
- address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',
567
- decimals: '18',
568
- name: 'Staked Eth',
569
- },
570
- stake_out: {
571
- usd: '1571.74',
572
- image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
573
- amount: '35081997661451346',
574
- symbol: 'ETH',
575
- address: '0x0000000000000000000000000000000000000000',
576
- decimals: '18',
577
- name: 'Ethereum',
578
- },
579
- network_fee: {
580
- gas_price: '12699495150',
581
- native_token_price_in_usd: '1571.74',
583
+ unread: true,
584
+ payload: {
585
+ block_number: 18378208,
586
+ block_timestamp: '1697643851',
587
+ chain_id: 1,
588
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
589
+ data: {
590
+ kind: 'lido_withdrawal_completed',
591
+ stake_in: {
592
+ usd: '1570.23',
593
+ image: 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg',
594
+ amount: '35081997661451346',
595
+ symbol: 'STETH',
596
+ address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',
597
+ decimals: '18',
598
+ name: 'Staked Eth',
599
+ },
600
+ stake_out: {
601
+ usd: '1571.74',
602
+ image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
603
+ amount: '35081997661451346',
604
+ symbol: 'ETH',
605
+ address: '0x0000000000000000000000000000000000000000',
606
+ decimals: '18',
607
+ name: 'Ethereum',
608
+ },
609
+ network_fee: {
610
+ gas_price: '12699495150',
611
+ native_token_price_in_usd: '1571.74',
612
+ },
582
613
  },
614
+ tx_hash: '0xe6d210d2e601ef3dd1075c48e71452cf35f2daae3886911e964e3babad8ac657',
583
615
  },
584
- id: 'd73df14d-ce73-4f38-bad3-ab028154042f',
585
- trigger_id: 'd73df14d-ce73-4f38-bad3-ab028154042f',
586
- tx_hash: '0xe6d210d2e601ef3dd1075c48e71452cf35f2daae3886911e964e3babad8ac657',
587
- unread: true,
588
616
  };
589
617
  return mockNotification;
590
618
  }
@@ -597,189 +625,59 @@ exports.createMockNotificationLidoWithdrawalCompleted = createMockNotificationLi
597
625
  function createMockNotificationLidoReadyToBeWithdrawn() {
598
626
  const mockNotification = {
599
627
  type: notification_schema_1.TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN,
600
- block_number: 18378208,
601
- block_timestamp: '1697643851',
602
- chain_id: 1,
603
- created_at: '2023-10-18T16:35:03.147606Z',
604
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
605
- data: {
606
- kind: 'lido_stake_ready_to_be_withdrawn',
607
- request_id: '123456789',
608
- staked_eth: {
609
- address: '0x881D40237659C251811CEC9c364ef91dC08D300F',
610
- symbol: 'ETH',
611
- name: 'Ethereum',
612
- amount: '2.5',
613
- decimals: '18',
614
- image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
615
- usd: '10000.00',
616
- },
617
- },
628
+ notification_type: 'on-chain',
618
629
  id: 'd73df14d-ce73-4f38-bad3-ab028154042e',
619
- trigger_id: 'd73df14d-ce73-4f38-bad3-ab028154042e',
620
- tx_hash: '0xe6d210d2e601ef3dd1075c48e71452cf35f2daae3886911e964e3babad8ac657',
621
- unread: true,
622
- };
623
- return mockNotification;
624
- }
625
- exports.createMockNotificationLidoReadyToBeWithdrawn = createMockNotificationLidoReadyToBeWithdrawn;
626
- /**
627
- * Mocking Utility - create a mock Aave V3 Health Factor notification
628
- *
629
- * @returns Mock raw Aave V3 Health Factor notification
630
- */
631
- function createMockNotificationAaveV3HealthFactor() {
632
- const mockNotification = {
633
- type: notification_schema_1.TRIGGER_TYPES.AAVE_V3_HEALTH_FACTOR,
634
- chain_id: 1,
635
- created_at: '2023-10-18T16:35:03.147606Z',
636
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
637
- data: {
638
- kind: 'aave_v3_health_factor',
639
- chainId: 1,
640
- healthFactor: '3.4',
641
- threshold: '5.5',
642
- },
643
- id: 'd73df14d-ce73-4f38-bad3-ab028154042b',
644
- trigger_id: 'd73df14d-ce73-4f38-bad3-ab028154042b',
645
- unread: true,
646
- };
647
- return mockNotification;
648
- }
649
- exports.createMockNotificationAaveV3HealthFactor = createMockNotificationAaveV3HealthFactor;
650
- /**
651
- * Mocking Utility - create a mock ENS Expiration notification
652
- *
653
- * @returns Mock raw ENS Expiration notification
654
- */
655
- function createMockNotificationEnsExpiration() {
656
- const mockNotification = {
657
- type: notification_schema_1.TRIGGER_TYPES.ENS_EXPIRATION,
658
- chain_id: 1,
659
630
  created_at: '2023-10-18T16:35:03.147606Z',
660
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
661
- data: {
662
- kind: 'ens_expiration',
663
- chainId: 1,
664
- reverseEnsName: 'vitalik.eth',
665
- expirationDateIso: '2024-01-01T00:00:00Z',
666
- reminderDelayInSeconds: 86400,
667
- },
668
- id: 'f4ef0b7f-5612-537f-9144-0b5c63ae5391',
669
- trigger_id: 'd73df14d-ce73-4f38-bad3-ab028154042c',
670
631
  unread: true,
671
- };
672
- return mockNotification;
673
- }
674
- exports.createMockNotificationEnsExpiration = createMockNotificationEnsExpiration;
675
- /**
676
- * Mocking Utility - create a mock Lido Staking Rewards notification
677
- *
678
- * @returns Mock raw Lido Staking Rewards notification
679
- */
680
- function createMockNotificationLidoStakingRewards() {
681
- const mockNotification = {
682
- type: notification_schema_1.TRIGGER_TYPES.LIDO_STAKING_REWARDS,
683
- chain_id: 1,
684
- created_at: '2023-10-18T16:35:03.147606Z',
685
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
686
- data: {
687
- kind: 'lido_staking_rewards',
688
- chainId: 1,
689
- currentStethBalance: '10',
690
- currentEthValue: '10.5',
691
- estimatedTotalRewardInPeriod: '0.5',
692
- daysSinceLastNotification: 30,
693
- notificationIntervalDays: 30,
694
- },
695
- id: 'd73df14d-ce73-4f38-bad3-ab028154042l',
696
- trigger_id: 'd73df14d-ce73-4f38-bad3-ab028154042l',
697
- unread: true,
698
- };
699
- return mockNotification;
700
- }
701
- exports.createMockNotificationLidoStakingRewards = createMockNotificationLidoStakingRewards;
702
- /**
703
- * Mocking Utility - create a mock Notional Loan Expiration notification
704
- *
705
- * @returns Mock raw Notional Loan Expiration notification
706
- */
707
- function createMockNotificationNotionalLoanExpiration() {
708
- const mockNotification = {
709
- type: notification_schema_1.TRIGGER_TYPES.NOTIONAL_LOAN_EXPIRATION,
710
- chain_id: 1,
711
- created_at: '2023-10-18T16:35:03.147606Z',
712
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
713
- data: {
714
- kind: 'notional_loan_expiration',
715
- chainId: 1,
716
- loans: [
717
- {
718
- amount: '1.1234',
632
+ payload: {
633
+ block_number: 18378208,
634
+ block_timestamp: '1697643851',
635
+ chain_id: 1,
636
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
637
+ data: {
638
+ kind: 'lido_stake_ready_to_be_withdrawn',
639
+ request_id: '123456789',
640
+ staked_eth: {
641
+ address: '0x881D40237659C251811CEC9c364ef91dC08D300F',
719
642
  symbol: 'ETH',
720
- maturityDateIso: '2024-01-01T00:00:00Z',
643
+ name: 'Ethereum',
644
+ amount: '2.5',
645
+ decimals: '18',
646
+ image: 'https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg',
647
+ usd: '10000.00',
721
648
  },
722
- ],
723
- reminderDelayInSeconds: 86400,
649
+ },
650
+ tx_hash: '0xe6d210d2e601ef3dd1075c48e71452cf35f2daae3886911e964e3babad8ac657',
724
651
  },
725
- id: 'd73df14d-ce73-4f38-bad3-ab028154042n',
726
- trigger_id: 'd73df14d-ce73-4f38-bad3-ab028154042n',
727
- unread: true,
728
652
  };
729
653
  return mockNotification;
730
654
  }
731
- exports.createMockNotificationNotionalLoanExpiration = createMockNotificationNotionalLoanExpiration;
655
+ exports.createMockNotificationLidoReadyToBeWithdrawn = createMockNotificationLidoReadyToBeWithdrawn;
732
656
  /**
733
- * Mocking Utility - create a mock Rocketpool Staking Rewards notification
657
+ * Mocking Utility - create a mock Generic Platform notification
734
658
  *
735
- * @returns Mock raw Rocketpool Staking Rewards notification
659
+ * @returns Mock raw Generic Platform notification
736
660
  */
737
- function createMockNotificationRocketpoolStakingRewards() {
661
+ function createMockPlatformNotification() {
738
662
  const mockNotification = {
739
- type: notification_schema_1.TRIGGER_TYPES.ROCKETPOOL_STAKING_REWARDS,
740
- chain_id: 1,
741
- created_at: '2023-10-18T16:35:03.147606Z',
742
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
743
- data: {
744
- kind: 'rocketpool_staking_rewards',
745
- chainId: 1,
746
- currentRethBalance: '10',
747
- currentEthValue: '10.5',
748
- estimatedTotalRewardInPeriod: '0.5',
749
- daysSinceLastNotification: 30,
750
- notificationIntervalDays: 30,
751
- },
752
- id: 'd73df14d-ce73-4f38-bad3-ab028154042r',
753
- trigger_id: 'd73df14d-ce73-4f38-bad3-ab028154042r',
663
+ type: notification_schema_1.TRIGGER_TYPES.PLATFORM,
664
+ notification_type: 'platform',
665
+ id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
754
666
  unread: true,
755
- };
756
- return mockNotification;
757
- }
758
- exports.createMockNotificationRocketpoolStakingRewards = createMockNotificationRocketpoolStakingRewards;
759
- /**
760
- * Mocking Utility - create a mock SparkFi Health Factor notification
761
- *
762
- * @returns Mock raw SparkFi Health Factor notification
763
- */
764
- function createMockNotificationSparkFiHealthFactor() {
765
- const mockNotification = {
766
- type: notification_schema_1.TRIGGER_TYPES.SPARK_FI_HEALTH_FACTOR,
767
- chain_id: 1,
768
- created_at: '2023-10-18T16:35:03.147606Z',
769
- address: '0x881D40237659C251811CEC9c364ef91dC08D300C',
770
- data: {
771
- kind: 'spark_fi_health_factor',
772
- chainId: 1,
773
- healthFactor: '3.4',
774
- threshold: '5.5',
667
+ created_at: '2025-10-09T09:45:34.202Z',
668
+ template: {
669
+ image_url: 'https://images.ctfassets.net/clixtyxoaeas/4rnpEzy1ATWRKVBOLxZ1Fm/a74dc1eed36d23d7ea6030383a4d5163/MetaMask-icon-fox.svg',
670
+ title: 'This is a Platform Notification!',
671
+ body: 'Teams can now build out their own notifications, and add an optional CTA (like this one below).',
672
+ cta: {
673
+ content: 'Get Started',
674
+ link: 'https://metamask.io/get-started',
675
+ },
775
676
  },
776
- id: 'd73df14d-ce73-4f38-bad3-ab028154042s',
777
- trigger_id: 'd73df14d-ce73-4f38-bad3-ab028154042s',
778
- unread: true,
779
677
  };
780
678
  return mockNotification;
781
679
  }
782
- exports.createMockNotificationSparkFiHealthFactor = createMockNotificationSparkFiHealthFactor;
680
+ exports.createMockPlatformNotification = createMockPlatformNotification;
783
681
  /**
784
682
  * Mocking Utility - creates an array of raw on-chain notifications
785
683
  *