Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated notification banner text and og images #123

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ export const metadata: Metadata = {
title: 'STRKFarm | Yield aggregator on Starknet',
description:
'Find and invest in high yield pools. STRKFarm is the best yield aggregator on Starknet.',
images: ['https://static-assets-8zct.onrender.com/strkfarm/preview.png'],
images: ['https://static-assets-8zct.onrender.com/strkfarm/og-img-png.png'],
},
twitter: {
creator: '@akiraonstarknet',
title: 'STRKFarm | Yield aggregator on Starknet',
description:
'Find and invest in high yield pools. STRKFarm is the best yield aggregator on Starknet.',
card: 'player',
images: ['https://static-assets-8zct.onrender.com/strkfarm/preview.png'],
images: ['https://static-assets-8zct.onrender.com/strkfarm/og-img-png.png'],
},
};

Expand Down
32 changes: 22 additions & 10 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,15 @@ import CONSTANTS from '@/constants';
import { getERC20Balance } from '@/store/balance.atoms';
import { addressAtom } from '@/store/claims.atoms';
import { referralCodeAtom } from '@/store/referral.store';
import { useEffect } from 'react';
import { lastWalletAtom } from '@/store/utils.atoms';
import {
generateReferralCode,
getTokenInfoFromName,
MyMenuItemProps,
MyMenuListProps,
truncate,
shortAddress,
standariseAddress,
truncate,
} from '@/utils';
import fulllogo from '@public/fulllogo.png';
import {
Expand All @@ -44,8 +43,9 @@ import {
} from '@starknet-react/core';
import axios from 'axios';
import mixpanel from 'mixpanel-browser';
import { isMobile } from 'react-device-detect';
import { useSearchParams } from 'next/navigation';
import { useEffect } from 'react';
import { isMobile } from 'react-device-detect';

interface NavbarProps {
hideTg?: boolean;
Expand Down Expand Up @@ -208,13 +208,25 @@ export default function Navbar(props: NavbarProps) {
top="0"
>
<Center bg="bg" color="gray" padding={0}>
<Link href={CONSTANTS.COMMUNITY_TG} target="_blank">
<Text fontSize="12px" textAlign={'center'} padding="0px 5px">
{''}
<b>Report bugs & share feedback in our Telegram group.</b>
{''}
</Text>
</Link>
<Text
fontSize="12px"
textAlign={'center'}
padding="6px 5px"
color="#8484C2"
>
<b>
STRKFarm just got audited by one of the top auditors in the
ecosystem.
<Link
target="_blank"
href="https://x.com/strkfarm/status/1833071604856987678"
color="#fff"
>
{' '}
Read more
</Link>
</b>
</Text>
</Center>
<Box
width={'100%'}
Expand Down
41 changes: 39 additions & 2 deletions src/components/TncModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,50 @@ const exampleData = {
},
};

const signingData = {
types: {
StarkNetDomain: [
{ name: 'name', type: 'felt' },
{ name: 'version', type: 'felt' },
{ name: 'chainId', type: 'felt' },
],
Person: [
{ name: 'name', type: 'felt' },
{ name: 'wallet', type: 'felt' },
],
Felt: [
{ name: 'from', type: 'Person' },
{ name: 'to', type: 'Person' },
{ name: 'contents', type: 'felt' },
],
},
primaryType: 'felt',
domain: {
name: 'STRKFarm',
version: '1',
chainId: '0x534e5f4d41494e',
},
message: {
from: {
name: 'Test1',
wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
},
to: {
name: 'Test2',
wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
},
contents:
'You confirm that you have read and agree to our Terms & Conditions, which can be found at https://github.com/strkfarm/static-assets/src/tnc.md.\n\nPlease note, this message is solely for verifying your agreement to our T&C and does not authorize any transaction or movement of your assets.',
},
};

interface TncModalProps {
isOpen: boolean;
onClose: () => void;
}

const TncModal: React.FC<TncModalProps> = ({ isOpen, onClose }) => {
const { signTypedDataAsync } = useSignTypedData(exampleData);
const { signTypedDataAsync } = useSignTypedData(signingData);
const { address } = useAccount();

const handleSign = async () => {
Expand All @@ -68,7 +105,7 @@ const TncModal: React.FC<TncModalProps> = ({ isOpen, onClose }) => {
onClose();
await axios.post('/api/tnc/signUser', {
address,
message: 'I agree to the terms and conditions',
message: res?.toString(),
});
}
};
Expand Down
Loading