Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
b997098
feat: UI redesign
EjembiEmmanuel Apr 14, 2025
3fd9aa5
chore: remove console
EjembiEmmanuel Apr 14, 2025
3336d91
feat: Add strategy status utilities and update strategy components
EjembiEmmanuel Apr 20, 2025
1c6d556
feat: yeild card background color
EjembiEmmanuel Apr 20, 2025
7529276
feat: risk and details tab
EjembiEmmanuel Apr 23, 2025
801375a
feat: FAQ tab
EjembiEmmanuel Apr 23, 2025
33eea94
Merge remote-tracking branch 'upstream/dev' into dev
EjembiEmmanuel Apr 25, 2025
af4ce74
feat: UI improvements
EjembiEmmanuel Apr 30, 2025
a915560
feat: disable cron jobs
EjembiEmmanuel Apr 30, 2025
295a7c8
feat: make strategies tab default
EjembiEmmanuel Apr 30, 2025
bc77aae
feat: update starkfarm sdk version
EjembiEmmanuel May 1, 2025
bde48ca
feat: add faqs to strategies
EjembiEmmanuel May 1, 2025
796f926
feat: show transaction history when wallet is connected
EjembiEmmanuel May 5, 2025
2970423
fix tx hist bug
akiraonstarknet May 7, 2025
fb9a336
Merge pull request #148 from akiraonstarknet/prod
akiraonstarknet May 7, 2025
e6b0c7c
fix @strkfarm/sdk to 1.0.35
akiraonstarknet May 10, 2025
01a8800
alerts: vesu mig alert
akiraonstarknet May 28, 2025
2cdc1fb
feat: maintainence mode
akiraonstarknet May 29, 2025
9e223fc
bump to sdk 1.0.43, fix vesu loading
akiraonstarknet May 30, 2025
cb908a6
Merge branch 'dev' of github.com:akiraonstarknet/starkfarm-client int…
akiraonstarknet May 30, 2025
ab6aa94
fix build
akiraonstarknet May 30, 2025
5fdb00a
fix build
akiraonstarknet May 30, 2025
4c67609
fix build
akiraonstarknet May 30, 2025
d31fc3e
fix bug
akiraonstarknet May 30, 2025
cdf4227
undo vesu maintenance
akiraonstarknet May 31, 2025
eab81a9
switch fusion vaults to active
akiraonstarknet Jun 4, 2025
d220f5d
add points
akiraonstarknet Jun 8, 2025
eab7366
Merge pull request #150 from akiraonstarknet/dev
akiraonstarknet Jun 9, 2025
3bd8319
mobile view changes
EjembiEmmanuel Jun 19, 2025
eed7d8d
ui: strategy page
EjembiEmmanuel Jun 20, 2025
2fcf86c
update ui
akiraonstarknet Jun 20, 2025
5e0325c
merge
akiraonstarknet Jun 20, 2025
b199c86
ui: strategy tabs
EjembiEmmanuel Jun 20, 2025
4a7730b
Merge remote-tracking branch 'akira/dev' into dev
EjembiEmmanuel Jun 20, 2025
fbc8869
clean strategy page
akiraonstarknet Jun 20, 2025
8460cdf
merge
akiraonstarknet Jun 20, 2025
b51b9f6
improved strategy page
akiraonstarknet Jun 20, 2025
86c5ba7
clean landing page
akiraonstarknet Jun 20, 2025
722501c
fix strategy page mobile
akiraonstarknet Jun 20, 2025
46518cb
integrate dynamic strat data
akiraonstarknet Jun 21, 2025
c67129c
link data
akiraonstarknet Jun 21, 2025
a237119
minor changes
akiraonstarknet Jun 23, 2025
ec0f8b4
minor changes
akiraonstarknet Jun 23, 2025
c18209e
ui: footer and other changes
EjembiEmmanuel Jun 23, 2025
73b4b7f
add favicons
akiraonstarknet Jun 23, 2025
06f6c07
add banner
akiraonstarknet Jun 23, 2025
3dec65c
ui: navbar fixes
EjembiEmmanuel Jun 23, 2025
be14dec
Merge pull request #154 from EjembiEmmanuel/dev
akiraonstarknet Jun 23, 2025
b6874b8
minor chjange
akiraonstarknet Jun 24, 2025
3429685
fixes
akiraonstarknet Jun 25, 2025
3ea9c0a
minor updates
akiraonstarknet Jun 25, 2025
d5b6755
update t&c
akiraonstarknet Jun 25, 2025
2adb100
update OG info
akiraonstarknet Jun 25, 2025
4400e68
fix dual tnc popup
akiraonstarknet Jun 26, 2025
c36d99a
update strkfarm redirect
akiraonstarknet Jun 26, 2025
7d61f2b
fix ekubo redirect bug
akiraonstarknet Jun 26, 2025
c8d5fff
chore: changes
hemantwasthere Jun 26, 2025
3d6feaa
Merge pull request #157 from hemantwasthere/dev
akiraonstarknet Jun 26, 2025
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
14 changes: 7 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
"no-dupe-class-members": 0,

// Warnings
"no-debugger": 1,
"no-empty": 1,
"no-invalid-regexp": 1,
"no-unused-expressions": 1,
"no-native-reassign": 1,
"no-fallthrough": 1,
"no-debugger": "off",
"no-empty": "off",
"no-invalid-regexp": "off",
"no-unused-expressions": "off",
"no-native-reassign": "off",
"no-fallthrough": "off",
"eqeqeq": "off",

// Errors
"eqeqeq": ["warn"],
"no-undef": 2,
"no-dupe-keys": 2,
"no-empty-character-class": 2,
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
.env
.env
*.log
21 changes: 15 additions & 6 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

const nextConfig = {
// output: 'export',
compiler: process.env.NODE_ENV == 'development' ? {} : {
removeConsole: {
exclude: ['error'],
},
},
compiler:
process.env.NODE_ENV == 'development'
? {}
: {
removeConsole: {
exclude: ['error'],
},
},
async rewrites() {
return [
{
Expand Down Expand Up @@ -72,7 +75,13 @@ const nextConfig = {
{
source: '/tnc/v1',
destination:
'https://github.com/strkfarm/static-assets/blob/177389cad715d69245c1b125df87f90318ac2d7b/tnc.pdf',
'https://github.com/trovesfi/static-assets/blob/177389cad715d69245c1b125df87f90318ac2d7b/tnc.pdf',
permanent: true,
},
{
source: '/tnc/v2',
destination:
'https://github.com/trovesfi/static-assets/blob/a0b4ff3a3533df35570311d95be37f1ffcb7fb54/tnc_v2.pdf',
permanent: true,
},
];
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@adraffy/ens-normalize": "^1.11.0",
"@ajna/pagination": "1.4.19",
"@apollo/client": "^3.11.8",
"@avnu/avnu-sdk": "^3.0.0",
"@avnu/avnu-sdk": "3.0.2",
"@chakra-ui/icons": "2.1.1",
"@chakra-ui/react": "2.8.2",
"@dagrejs/dagre": "^1.1.4",
Expand All @@ -34,7 +34,7 @@
"@prisma/client": "5.18.0",
"@starknet-react/chains": "3.0.0",
"@starknet-react/core": "3.0.1",
"@strkfarm/sdk": "^1.0.35",
"@strkfarm/sdk": "^1.0.51",
"@tanstack/query-core": "5.28.0",
"@types/mixpanel-browser": "2.49.0",
"@types/mustache": "4.2.5",
Expand All @@ -43,10 +43,12 @@
"@vercel/speed-insights": "1.0.12",
"@xyflow/react": "^12.4.4",
"aes-js": "^3.1.2",
"asynckit": "^0.4.0",
"axios": "1.6.7",
"bignumber.js": "4.0.4",
"chroma.ts": "1.0.10",
"coinmarketcap-api": "^3.1.1",
"combined-stream": "^1.0.8",
"ethers": "6.11.1",
"framer-motion": "11.0.5",
"get-starknet": "3.3.3",
Expand All @@ -55,13 +57,13 @@
"jotai": "2.6.4",
"jotai-tanstack-query": "0.8.5",
"lodash.debounce": "^4.0.8",
"mime-types": "^3.0.1",
"mixpanel": "^0.18.0",
"mixpanel-browser": "2.49.0",
"mustache": "4.2.0",
"next": "14.1.0",
"proxy-from-env": "^1.1.0",
"react": "18",
"react-device-detect": "2.2.3",
"react-dom": "18",
"react-hot-toast": "2.4.1",
"react-icons": "5.3.0",
Expand Down Expand Up @@ -99,7 +101,7 @@
"typescript": "5"
},
"engines": {
"node": "20.x"
"node": ">=20.x"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
1 change: 1 addition & 0 deletions public/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon/favicon.ico
Binary file not shown.
19 changes: 19 additions & 0 deletions public/favicon/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Troves.fi | Yield Strategies for Starknet",
"short_name": "Troves.fi",
"background_color": "#000000",
"theme_color": "#000000",
"icons": [
{
"src": "/favicon/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/favicon/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"display": "standalone"
}
Binary file modified public/fulllogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/fulllogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/tg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 15 additions & 3 deletions src/app/api/lib.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { STRKFarmStrategyAPIResult } from '@/store/strkfarm.atoms';
import { TrovesStrategyAPIResult } from '@/store/troves.atoms';
import { Redis } from '@upstash/redis';
import { Contract, RpcProvider, uint256 } from 'starknet';

Expand All @@ -16,6 +16,11 @@ export async function getDataFromRedis(
// force no cache
return null;
}

if (!process.env.VK_REDIS_KV_REST_API_URL) {
return null;
}

const cacheData: any = await kvRedis.get(key);
if (
cacheData &&
Expand All @@ -29,10 +34,17 @@ export async function getDataFromRedis(
return null;
}

export default kvRedis;
export async function setDataToRedis(key: string, data: any) {
if (!process.env.VK_REDIS_KV_REST_API_URL) {
return;
}

await kvRedis.set(key, data);
console.log(`Cache set for ${key}`);
}

export const getRewardsInfo = async (
strategies: Pick<STRKFarmStrategyAPIResult, 'id' | 'tvlUsd' | 'contract'>[],
strategies: Pick<TrovesStrategyAPIResult, 'id' | 'tvlUsd' | 'contract'>[],
) => {
const funder =
'0x02D6cf6182259ee62A001EfC67e62C1fbc0dF109D2AA4163EB70D6d1074F0173';
Expand Down
10 changes: 5 additions & 5 deletions src/app/api/strategies/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { RpcProvider } from 'starknet';
import { getLiveStatusNumber, getStrategies } from '@/store/strategies.atoms';
import MyNumber from '@/utils/MyNumber';
import { IStrategy, NFTInfo, TokenInfo } from '@/strategies/IStrategy';
import { STRKFarmStrategyAPIResult } from '@/store/strkfarm.atoms';
import { TrovesStrategyAPIResult } from '@/store/troves.atoms';
import { MY_STORE } from '@/store';
import VesuAtoms, { vesu } from '@/store/vesu.store';
import EndurAtoms, { endur } from '@/store/endur.store';
import kvRedis, { getDataFromRedis, getRewardsInfo } from '../lib';
import { setDataToRedis, getDataFromRedis, getRewardsInfo } from '../lib';

export const revalidate = 1800; // 30 minutes
export const dynamic = 'force-dynamic';
Expand Down Expand Up @@ -56,7 +56,7 @@ const provider = new RpcProvider({

async function getStrategyInfo(
strategy: IStrategy<any>,
): Promise<STRKFarmStrategyAPIResult> {
): Promise<TrovesStrategyAPIResult> {
const tvl = await strategy.getTVL();

const data = {
Expand Down Expand Up @@ -158,7 +158,7 @@ export async function GET(req: Request) {
// }
// });

const stratsDataProms: Promise<STRKFarmStrategyAPIResult>[] = [];
const stratsDataProms: Promise<TrovesStrategyAPIResult>[] = [];
for (let i = 0; i < strategies.length; i++) {
stratsDataProms.push(getStrategyInfo(strategies[i]));
}
Expand All @@ -181,7 +181,7 @@ export async function GET(req: Request) {
strategies: _strats,
lastUpdated: new Date().toISOString(),
};
await kvRedis.set(REDIS_KEY, data);
await setDataToRedis(REDIS_KEY, data);
const response = NextResponse.json(data);
response.headers.set(
'Cache-Control',
Expand Down
14 changes: 8 additions & 6 deletions src/app/community/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ const CommunityPage = () => {
variant="outline"
border="1px"
borderRadius="5px"
color={'white'}
zIndex={1}
_before={{
content: `""`,
Expand All @@ -224,10 +225,10 @@ const CommunityPage = () => {
zIndex: -1,
}}
_hover={{
bg: 'color2_50p',
bg: 'mycard',
}}
>
<Text className="theme-gradient-text">Know more</Text>
<Text>Know more</Text>
</Button>
</Link>
</Box>
Expand Down Expand Up @@ -274,7 +275,7 @@ const CommunityPage = () => {
</Button>
</Box>
<Link
href={`https://twitter.com/intent/tweet?text=${encodeURIComponent('I am proud to be part of @strkfarm community. They are issuing points and NFTs for their active users.\n\nJoin using my referral link:')}%20https://${getHosturl()}/r/${referralCode}`}
href={`https://twitter.com/intent/tweet?text=${encodeURIComponent('I am proud to be part of @trovesfi community. They are issuing points and NFTs for their active users.\n\nJoin using my referral link:')}%20https://${getHosturl()}/r/${referralCode}`}
isExternal={true}
>
<Button
Expand Down Expand Up @@ -493,7 +494,7 @@ const CommunityPage = () => {

<Box>
<Link
href={`https://twitter.com/intent/tweet?text=${encodeURIComponent('I just claimed my Limited Edition OG Farmer NFT on @STRKFarm! Have you gotten yours yet? You might still be eligible, don’t miss out!')}`}
href={`https://twitter.com/intent/tweet?text=${encodeURIComponent('I just claimed my Limited Edition OG Farmer NFT on @trovesfi! Have you gotten yours yet? You might still be eligible, don’t miss out!')}`}
isExternal={true}
_hover={{
textDecoration: 'none',
Expand All @@ -506,10 +507,11 @@ const CommunityPage = () => {
padding={{ base: '5px 10px', md: '10px' }}
fontSize={{ md: '14px' }}
background="white"
color="black"
color="white"
bg="purple"
borderRadius="5px"
_hover={{
bg: 'color1_50p',
bg: 'purple',
color: 'white',
}}
>
Expand Down
Binary file modified src/app/favicon.ico
100755 → 100644
Binary file not shown.
33 changes: 12 additions & 21 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@
}

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
/* color: rgb(var(--foreground-rgb)); */
color: #fff;
background-color: #fff;
}

@layer utilities {
Expand All @@ -32,10 +28,6 @@ body {
}
}

.pagination-container {
padding: 20px 0px 2px 0px !important;
}

.glow-button {
width: 220px;
height: 50px;
Expand Down Expand Up @@ -130,7 +122,7 @@ body {

.text-cell {
border-bottom: 1px solid var(--chakra-colors-bg);
padding: 3px;
/* padding: 3px; */
}

.embla {
Expand All @@ -155,12 +147,7 @@ body {
}

.theme-gradient-text {
background: linear-gradient(
to right,
var(--chakra-colors-purple) 10%,
var(--chakra-colors-cyan) 50%,
var(--chakra-colors-cyan) 100%
);
background: linear-gradient(90.4deg, #ffffff 0.35%, #8f68ef 101.19%);
-webkit-background-clip: text;
color: transparent;
}
Expand All @@ -173,14 +160,18 @@ body {
);
}

.connect-button-gradient {
background: linear-gradient(93.94deg, #9069f0 3.22%, #4a14cd 101.67%);
}

td,
th {
tr {
border-color: var(--chakra-colors-bg) !important;
vertical-align: top;
border-bottom: 1px solid var(--chakra-colors-color_3) !important;
}

th {
color: var(--chakra-colors-color2Text) !important;
border-bottom: none !important;
}

.orange {
Expand Down
Loading
Loading