diff --git a/apps/staking/app/layout.tsx b/apps/staking/app/layout.tsx index af65cdbe..a9570987 100644 --- a/apps/staking/app/layout.tsx +++ b/apps/staking/app/layout.tsx @@ -13,9 +13,9 @@ import ChainBanner from '@/components/ChainBanner'; import Header from '@/components/Header'; import { GlobalProvider } from '@/providers/global-provider'; import { TOSHandler } from '@/components/TOSHandler'; -import { RegistrationPausedInfo } from '@/components/RegistrationPausedInfo'; -import { Banner } from '@session/ui/components/Banner'; import { getBuildInfo } from '@session/util/build'; +import { Banner } from '@session/ui/components/Banner'; +import { NewTokenContractInfo } from '@/components/NewTokenContractInfo'; const wagmiConfig = createWagmiConfig({ projectId: NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID, @@ -45,12 +45,15 @@ export default async function RootLayout({ children }: { children: React.ReactNo wagmiMetadata={wagmiMetadata} > - - -
-
{children}
- {!isProduction ? : null} - + + + + + {/**/} +
+
{children}
+ {!isProduction ? : null} + diff --git a/apps/staking/app/register/[nodeId]/NodeRegistration.tsx b/apps/staking/app/register/[nodeId]/NodeRegistration.tsx index 68e355ee..a8e7c4ed 100644 --- a/apps/staking/app/register/[nodeId]/NodeRegistration.tsx +++ b/apps/staking/app/register/[nodeId]/NodeRegistration.tsx @@ -34,7 +34,7 @@ import { toast } from '@session/ui/lib/sonner'; import { RegistrationPausedInfo } from '@/components/RegistrationPausedInfo'; // TODO - remove with feature flag pr -const registrationPaused = true; +const registrationPaused = false; export default function NodeRegistration({ nodeId }: { nodeId: string }) { const showMockRegistration = useFeatureFlag(FEATURE_FLAG.MOCK_REGISTRATION); diff --git a/apps/staking/components/NewTokenContractInfo.tsx b/apps/staking/components/NewTokenContractInfo.tsx new file mode 100644 index 00000000..9d4d8c3b --- /dev/null +++ b/apps/staking/components/NewTokenContractInfo.tsx @@ -0,0 +1,49 @@ +'use client'; + +import Link from 'next/link'; +import { BASE_URL, SOCIALS, URL } from '@/lib/constants'; +import { Social } from '@session/ui/components/SocialLinkList'; +import { ReactNode } from 'react'; +import { useTranslations } from 'next-intl'; +import { useAddSessionTokenToWallet } from '@session/wallet/hooks/wallet-hooks'; + +export function NewTokenContractInfo() { + const dictionary = useTranslations('banner'); + const { addToken } = useAddSessionTokenToWallet(`${BASE_URL}/images/token_logo.svg`); + return ( + + {dictionary.rich('newTokenContract', { + 'remove-token-link': (children: ReactNode) => ( + + {children} + + ), + 'watch-token': (children: ReactNode) => ( + + {children} + + ), + link: (children: ReactNode) => ( + + {children} + + ), + })} + + ); +} diff --git a/apps/staking/lib/constants.ts b/apps/staking/lib/constants.ts index 1e22f282..45788791 100644 --- a/apps/staking/lib/constants.ts +++ b/apps/staking/lib/constants.ts @@ -24,6 +24,7 @@ export enum URL { BUG_BOUNTY_PROGRAM = 'https://token.getsession.org/bug-bounty-program', BUG_BOUNTY_TOS = 'https://token.getsession.org/bug-bounty-terms', SESSION_NODE_SOLO_SETUP_DOCS = 'https://docs.getsession.org/class-is-in-session/session-stagenet-single-contributor-node-setup', + REMOVE_TOKEN_FROM_WATCH_LIST = 'https://support.metamask.io/managing-my-tokens/custom-tokens/how-to-remove-a-token/', } export const LANDING_BUTTON_URL = { diff --git a/apps/staking/locales/en.json b/apps/staking/locales/en.json index 555a459e..8e7935ec 100644 --- a/apps/staking/locales/en.json +++ b/apps/staking/locales/en.json @@ -160,7 +160,8 @@ "testnet": "You are currently on {testnetName}." }, "banner": { - "registrationPaused": "Stagenet node registration is temporarily paused. Apologies for any inconvenience, we expect to be able to re-enable registrations soon. For updates, visit the Session Token discord." + "registrationPaused": "Stagenet node registration is temporarily paused. Apologies for any inconvenience, we expect to be able to re-enable registrations soon. For updates, visit the Session Token discord.", + "newTokenContract": "The Session Token contract has been updated. Remove the old token and add the new token contract to your wallet watch list to continue using the Staking Portal. If you have any questions, visit the Session Token Discord." }, "modules": { "title": {