Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/EveripediaNetwork/iq-ui int…
Browse files Browse the repository at this point in the history
…o swappage-revamp
  • Loading branch information
Damola18 committed Mar 27, 2024
2 parents 5ab7626 + f355d02 commit bed4082
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 5 deletions.
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const nextConfig = {
},
images: {
domains: [
'static.debank.com',
'everipedia.org',
'figma.com',
'ipfs.everipedia.org',
Expand Down
34 changes: 34 additions & 0 deletions public/images/convex_staked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 16 additions & 4 deletions src/components/dashboard/TreasuryGraphTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
Box,
useColorMode,
Flex,
Image,
Text,
} from '@chakra-ui/react'
import React, { useCallback, useState, useEffect, useRef } from 'react'
Expand All @@ -29,6 +28,7 @@ import Chart from '../elements/PieChart/Chart'
import { useLockOverview } from '@/hooks/useLockOverview'
import { useGetIqPriceQuery } from '@/services/iqPrice'
import config from '@/config'
import Image from 'next/image'

export const TreasuryGraphTable = ({
setTreasuryValue,
Expand Down Expand Up @@ -175,13 +175,25 @@ export const TreasuryGraphTable = ({
{TOKENS[token?.id]?.icon ? (
<Icon as={TOKENS[token.id].icon} boxSize={7} />
) : TOKENS[token?.id]?.image ? (
<Image src={TOKENS[token.id].image} width="30px" />
<Image
src={TOKENS[token.id].image as string}
alt="token image"
width={30}
height={30}
/>
) : token?.logo ? (
<Image src={token?.logo} boxSize={7} />
<Image
src={token?.logo}
width={30}
height={30}
alt="token logo"
/>
) : (
<Image
src="/images/tokens/unknown-logo.png"
boxSize={7}
width={30}
height={30}
alt="token logo"
/>
)}
<Text noOfLines={1} whiteSpace="normal">
Expand Down
6 changes: 6 additions & 0 deletions src/data/treasury-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ export const TOKENS: TokensType = {
name: 'sfrxETH',
address: '0xac3e018457b222d93114458476f3e3416abbe38f',
},
convex_staked: {
id: 'convex_staked',
image: '/images/convex_staked.svg',
name: 'frxETH + IQ',
address: '0xfa87db3eaa93b7293021e38416650d2e666bc483',
},
WBTC: {
id: 'wrapped-btc',
image: '/images/wbtc.svg',
Expand Down
8 changes: 7 additions & 1 deletion src/utils/treasury-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ const SUPPORTED_LP_TOKENS_ADDRESSES = [
'0x49b4d1df40442f0c31b1bbaea3ede7c38e37e31a',
'0xfa87db3eaa93b7293021e38416650d2e666bc483',
'0xdbe88dbac39263c47629ebba02b3ef4cf0752a72',
//newly added lp
'0xa1d100a5bf6bfd2736837c97248853d989a9ed84',
'0xbf7b90683fd7e64dbf624809d49bdcb20f09e560',
'0x41a5881c17185383e19df6fa4ec158a6f4851a69:48',
'0x41a5881c17185383e19df6fa4ec158a6f4851a69:68',
'0x41a5881c17185383e19df6fa4ec158a6f4851a69:69',
'0xfa87db3eaa93b7293021e38416650d2e666bc483',
]

const PROTOCOLS = ['fraxlend', 'convex', 'frax']
Expand Down Expand Up @@ -66,7 +73,6 @@ export const getTreasuryDetails = async () => {
{ walletAddress: config.treasuryAddress as string },
'/api/fetch-tokens',
)

const protocolDetailsPayload = {
protocolId: 'apestake',
id: config.treasuryAddress as string,
Expand Down

0 comments on commit bed4082

Please sign in to comment.