Skip to content

Commit

Permalink
feat: Add Keplr launch notification (#988)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosepuppy authored Sep 6, 2024
1 parent 26a2109 commit 06da280
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@datadog/browser-logs": "^5.23.3",
"@dydxprotocol/v4-abacus": "1.9.7",
"@dydxprotocol/v4-client-js": "^1.1.27",
"@dydxprotocol/v4-localization": "^1.1.189",
"@dydxprotocol/v4-localization": "^1.1.190",
"@emotion/is-prop-valid": "^1.3.0",
"@ethersproject/providers": "^5.7.2",
"@hugocxl/react-to-image": "^0.0.9",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/constants/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export enum ReleaseUpdateNotificationIds {
DiscoveryProgram = 'discovery-program',
Twitter200BVolume = 'twitter-200b-volume',
IncentivesS6 = 'incentives-s6',
KeplrSupport = 'keplr-support',
}

// Incentives Season
Expand Down
18 changes: 18 additions & 0 deletions src/hooks/useNotificationTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import { DydxChainAsset } from '@/constants/wallets';

import { useLocalNotifications } from '@/hooks/useLocalNotifications';

import { KeplrIcon } from '@/icons';

import { AssetIcon } from '@/components/AssetIcon';
import { Icon, IconName } from '@/components/Icon';
import { Link } from '@/components/Link';
Expand Down Expand Up @@ -349,6 +351,22 @@ export const notificationTypes: NotificationTypeConfig[] = [
[]
);
}

if (featureFlags?.[StatSigFlags.ffEnableKeplr]) {
trigger(
ReleaseUpdateNotificationIds.KeplrSupport,
{
icon: <KeplrIcon />,
title: stringGetter({ key: STRING_KEYS.KEPLR_SUPPORT_TITLE }),
body: stringGetter({
key: STRING_KEYS.KEPLR_SUPPORT_BODY,
}),
toastSensitivity: 'foreground',
groupKey: ReleaseUpdateNotificationIds.KeplrSupport,
},
[]
);
}
}, [stringGetter]);

const { dydxAddress } = useAccounts();
Expand Down

0 comments on commit 06da280

Please sign in to comment.