Skip to content

Commit

Permalink
fix: 🐛 use better mock data (#4791)
Browse files Browse the repository at this point in the history
## Explanation

This PR modifies some mock data returned by the
NotificationServicesController to provide more realistic data for use in
tests and component rendering in Storybook.

## References

N/A

## Changelog

### `@metamask/notification-services-controller`

- **CHANGED**: some functions in `mock-raw-notifications` now return
more realistic mock data


## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
- [x] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
  • Loading branch information
matteoscurati authored Oct 14, 2024
1 parent a63a4ea commit a076a7c
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ export function createMockNotificationEnsExpiration(): OnChainRawNotification {
data: {
kind: 'ens_expiration',
chainId: 1,
reverseEnsName: 'example.eth',
reverseEnsName: 'vitalik.eth',
expirationDateIso: '2024-01-01T00:00:00Z',
reminderDelayInSeconds: 86400,
},
Expand Down Expand Up @@ -733,11 +733,11 @@ export function createMockNotificationLidoStakingRewards(): OnChainRawNotificati
data: {
kind: 'lido_staking_rewards',
chainId: 1,
currentStethBalance: '100',
currentEthValue: '10000.00',
estimatedTotalRewardInPeriod: '10000.00',
daysSinceLastNotification: 1,
notificationIntervalDays: 1,
currentStethBalance: '10',
currentEthValue: '10.5',
estimatedTotalRewardInPeriod: '0.5',
daysSinceLastNotification: 30,
notificationIntervalDays: 30,
},
id: 'd73df14d-ce73-4f38-bad3-ab028154042l',
trigger_id: 'd73df14d-ce73-4f38-bad3-ab028154042l',
Expand Down Expand Up @@ -766,7 +766,7 @@ export function createMockNotificationNotionalLoanExpiration(): OnChainRawNotifi
chainId: 1,
loans: [
{
amount: '100',
amount: '1.1234',
symbol: 'ETH',
maturityDateIso: '2024-01-01T00:00:00Z',
},
Expand Down Expand Up @@ -798,11 +798,11 @@ export function createMockNotificationRocketpoolStakingRewards(): OnChainRawNoti
data: {
kind: 'rocketpool_staking_rewards',
chainId: 1,
currentRethBalance: '100',
currentEthValue: '10000.00',
estimatedTotalRewardInPeriod: '10000.00',
daysSinceLastNotification: 1,
notificationIntervalDays: 1,
currentRethBalance: '10',
currentEthValue: '10.5',
estimatedTotalRewardInPeriod: '0.5',
daysSinceLastNotification: 30,
notificationIntervalDays: 30,
},
id: 'd73df14d-ce73-4f38-bad3-ab028154042r',
trigger_id: 'd73df14d-ce73-4f38-bad3-ab028154042r',
Expand Down

0 comments on commit a076a7c

Please sign in to comment.