From 4e89c87537f365d445b997d6309a7ea16475945b Mon Sep 17 00:00:00 2001 From: moo-onthelawn <70078372+moo-onthelawn@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:50:56 -0400 Subject: [PATCH] chore(incentives): season 6 is starting notif (#807) --- package.json | 2 +- pnpm-lock.yaml | 9 +++++---- src/constants/notifications.ts | 7 ++++--- src/hooks/useNotificationTypes.tsx | 7 ++++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 6c86f68c2..a20131a1d 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@cosmjs/tendermint-rpc": "^0.32.1", "@dydxprotocol/v4-abacus": "1.8.40", "@dydxprotocol/v4-client-js": "^1.1.27", - "@dydxprotocol/v4-localization": "^1.1.151", + "@dydxprotocol/v4-localization": "^1.1.152", "@ethersproject/providers": "^5.7.2", "@hugocxl/react-to-image": "^0.0.9", "@js-joda/core": "^5.5.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2d8ec526e..cfdd858ec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ dependencies: specifier: ^1.1.27 version: 1.1.27 '@dydxprotocol/v4-localization': - specifier: ^1.1.151 - version: 1.1.151 + specifier: ^1.1.152 + version: 1.1.153 '@ethersproject/providers': specifier: ^5.7.2 version: 5.7.2 @@ -3239,8 +3239,8 @@ packages: - utf-8-validate dev: false - /@dydxprotocol/v4-localization@1.1.151: - resolution: {integrity: sha512-glX4fKj/Dmo1rCT/4CqgETbkfZqls6p1k85LuvckYqRWLL8lkC/AUp80o8haS0BDRNILWoe/loK8tTPse+3RUQ==} + /@dydxprotocol/v4-localization@1.1.153: + resolution: {integrity: sha512-Zwj5fFM8eLvTS4rf5QH8x1V9+oAIyPdjdRXl3Cx+YJS8iiqs7/uiTp004wlJHQ/Ec0WuCr+0M+JwiK0Hr0AkEQ==} dev: false /@dydxprotocol/v4-proto@5.0.0-dev.0: @@ -15218,6 +15218,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 e4e5158d7..26607d53f 100644 --- a/src/constants/notifications.ts +++ b/src/constants/notifications.ts @@ -207,7 +207,7 @@ export type TransferNotifcation = { export enum ReleaseUpdateNotificationIds { RevampedConditionalOrders = 'revamped-conditional-orders', - IncentivesS5 = 'incentives-s5', + IncentivesS6 = 'incentives-s6', IncentivesDistributedS4 = 'incentives-distributed-s4', FOKDeprecation = 'fok-deprecation', IsolatedMarginLive = 'isolated-margin-live', // Added 06/12/2024 @@ -215,9 +215,10 @@ export enum ReleaseUpdateNotificationIds { } // Incentives Season -export const CURRENT_SEASON_NUMBER = 5; +export const CURRENT_SEASON_NUMBER = 6; export const REWARD_DISTRIBUTION_SEASON_NUMBER = 4; -export const INCENTIVES_SEASON_NOTIFICATION_ID = ReleaseUpdateNotificationIds.IncentivesS5; +export const MEDIAN_REWARDS_AMOUNT = { DYDX: 52, USDC: 63 }; +export const INCENTIVES_SEASON_NOTIFICATION_ID = ReleaseUpdateNotificationIds.IncentivesS6; export const INCENTIVES_DISTRIBUTED_NOTIFICATION_ID = ReleaseUpdateNotificationIds.IncentivesDistributedS4; diff --git a/src/hooks/useNotificationTypes.tsx b/src/hooks/useNotificationTypes.tsx index 1ada889cf..eb13a3d5f 100644 --- a/src/hooks/useNotificationTypes.tsx +++ b/src/hooks/useNotificationTypes.tsx @@ -19,6 +19,7 @@ import { DEFAULT_TOAST_AUTO_CLOSE_MS, INCENTIVES_DISTRIBUTED_NOTIFICATION_ID, INCENTIVES_SEASON_NOTIFICATION_ID, + MEDIAN_REWARDS_AMOUNT, MarketWindDownNotificationIds, NotificationDisplayData, NotificationType, @@ -276,7 +277,7 @@ export const notificationTypes: NotificationTypeConfig[] = [ const { chainTokenLabel } = useTokenConfigs(); const stringGetter = useStringGetter(); - const incentivesExpirationDate = new Date('2024-07-17T23:59:59'); + const incentivesExpirationDate = new Date('2024-08-16T23:59:59'); const conditionalOrdersExpirationDate = new Date('2024-06-01T23:59:59'); const fokDeprecationExpirationDate = new Date('2024-07-01T23:59:59'); const isolatedMarginLiveExpirationDate = new Date('2024-07-12T23:59:59'); @@ -300,8 +301,8 @@ export const notificationTypes: NotificationTypeConfig[] = [ key: 'NOTIFICATIONS.INCENTIVES_SEASON_BEGUN.BODY', params: { PREV_SEASON_NUMBER: CURRENT_SEASON_NUMBER - 2, // we generally only have data for rewards from 2 seasons ago because the new season launches before the previous season's rewards are distributed - DYDX_AMOUNT: '52', - USDC_AMOUNT: '100', + DYDX_AMOUNT: MEDIAN_REWARDS_AMOUNT.DYDX, + USDC_AMOUNT: MEDIAN_REWARDS_AMOUNT.USDC, }, }), toastSensitivity: 'foreground',