From 31b29b06ba887ce22835bb33d93a7f4c53d18182 Mon Sep 17 00:00:00 2001 From: moo-onthelawn <70078372+moo-onthelawn@users.noreply.github.com> Date: Tue, 28 May 2024 13:41:51 -0400 Subject: [PATCH] chore(incentives): Update notification for incentives season 5 (#590) --- package.json | 2 +- pnpm-lock.yaml | 9 +++++---- src/constants/notifications.ts | 2 +- src/hooks/useNotificationTypes.tsx | 16 ++++++++-------- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index e7f43523c..d403fb955 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@cosmjs/tendermint-rpc": "^0.32.1", "@dydxprotocol/v4-abacus": "1.7.18", "@dydxprotocol/v4-client-js": "^1.1.10", - "@dydxprotocol/v4-localization": "^1.1.86", + "@dydxprotocol/v4-localization": "^1.1.90", "@ethersproject/providers": "^5.7.2", "@js-joda/core": "^5.5.3", "@privy-io/react-auth": "^1.59.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d1804d4a4..0c5aa7cb9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ dependencies: specifier: ^1.1.10 version: 1.1.10 '@dydxprotocol/v4-localization': - specifier: ^1.1.86 - version: 1.1.86 + specifier: ^1.1.90 + version: 1.1.90 '@ethersproject/providers': specifier: ^5.7.2 version: 5.7.2 @@ -1411,8 +1411,8 @@ packages: - utf-8-validate dev: false - /@dydxprotocol/v4-localization@1.1.86: - resolution: {integrity: sha512-xaLw6reqdmK2KAC5Ct3TdVw40nnnIQHVFFPZ/s4+vd2Ejd8XCHDiHVmYbcft8hftZEwBPd3V6Zd/X4c3Ioyw1g==} + /@dydxprotocol/v4-localization@1.1.90: + resolution: {integrity: sha512-Nd7bwD5463F1NjX7YrCsVlYcsICHh1KdF8K1l/FFN+JiXQrFk7wa/TYpm4ea1yZLqLXjJLYUeNdCaSt41H6oZw==} dev: false /@dydxprotocol/v4-proto@5.0.0-dev.0: @@ -11745,6 +11745,7 @@ packages: is-hex-prefixed: 1.0.0 strip-hex-prefix: 1.0.0 dev: false + bundledDependencies: false /event-emitter@0.3.5: resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} diff --git a/src/constants/notifications.ts b/src/constants/notifications.ts index 74830e0ea..ec51a3220 100644 --- a/src/constants/notifications.ts +++ b/src/constants/notifications.ts @@ -183,7 +183,7 @@ export type TransferNotifcation = { export enum ReleaseUpdateNotificationIds { RevampedConditionalOrders = 'revamped-conditional-orders', - IncentivesS4 = 'incentives-s4', + IncentivesS5 = 'incentives-s5', IncentivesDistributedS3 = 'incentives-distributed-s3', } diff --git a/src/hooks/useNotificationTypes.tsx b/src/hooks/useNotificationTypes.tsx index fce60f6d2..ae3b2a78c 100644 --- a/src/hooks/useNotificationTypes.tsx +++ b/src/hooks/useNotificationTypes.tsx @@ -275,7 +275,7 @@ export const notificationTypes: NotificationTypeConfig[] = [ const { chainTokenLabel } = useTokenConfigs(); const stringGetter = useStringGetter(); - const incentivesExpirationDate = new Date('2024-05-09T23:59:59'); + const incentivesExpirationDate = new Date('2024-07-17T23:59:59'); const conditionalOrdersExpirationDate = new Date('2024-06-01T23:59:59'); const currentDate = new Date(); @@ -283,23 +283,23 @@ export const notificationTypes: NotificationTypeConfig[] = [ useEffect(() => { if (currentDate <= incentivesExpirationDate) { trigger( - ReleaseUpdateNotificationIds.IncentivesS4, + ReleaseUpdateNotificationIds.IncentivesS5, { icon: , title: stringGetter({ key: 'NOTIFICATIONS.INCENTIVES_SEASON_BEGUN.TITLE', - params: { SEASON_NUMBER: '4' }, + params: { SEASON_NUMBER: '5' }, }), body: stringGetter({ key: 'NOTIFICATIONS.INCENTIVES_SEASON_BEGUN.BODY', params: { - PREV_SEASON_NUMBER: '2', - DYDX_AMOUNT: '16', - USDC_AMOUNT: '50', + PREV_SEASON_NUMBER: '3', + DYDX_AMOUNT: '52', + USDC_AMOUNT: '100', }, }), toastSensitivity: 'foreground', - groupKey: ReleaseUpdateNotificationIds.IncentivesS4, + groupKey: ReleaseUpdateNotificationIds.IncentivesS5, }, [] ); @@ -372,7 +372,7 @@ export const notificationTypes: NotificationTypeConfig[] = [ const navigate = useNavigate(); return (notificationId: string) => { - if (notificationId === ReleaseUpdateNotificationIds.IncentivesS4) { + if (notificationId === ReleaseUpdateNotificationIds.IncentivesS5) { navigate(`${chainTokenLabel}/${TokenRoute.TradingRewards}`); } else if (notificationId === ReleaseUpdateNotificationIds.IncentivesDistributedS3) { navigate(`${chainTokenLabel}/${TokenRoute.StakingRewards}`);