Skip to content

Commit 84c7842

Browse files
committed
fix: integrate api
1 parent 038e458 commit 84c7842

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

src/app/sessions/Header/TotalMarks.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,6 @@ const TotalPoints = () => {
4242
initialData: {},
4343
})
4444

45-
const { data: session0And1Data, isFetching: session0And1Loading } = useQuery({
46-
queryKey: ["session0And1Marks", walletCurrentAddress],
47-
queryFn: async () => {
48-
const data = await scrollRequest(fetchSession0And1TotalMarksURL(walletCurrentAddress))
49-
if (data.status !== "1") {
50-
return Promise.reject(new Error("Something went wrong, please try again later."))
51-
}
52-
return data.result
53-
},
54-
enabled: !!walletCurrentAddress && hasSignedTerms,
55-
refetchOnWindowFocus: false,
56-
initialData: {},
57-
})
58-
5945
return (
6046
<MotionBox
6147
sx={[
@@ -98,10 +84,10 @@ const TotalPoints = () => {
9884
</Typography>
9985
<Typography sx={{ fontSize: "1.4rem", lineHeight: ["2rem", "2.4rem"], fontFamily: "var(--developer-page-font-family)" }}>
10086
Marks carried over from Session 0 & 1:{" "}
101-
{session0And1Loading ? (
87+
{session2Loading ? (
10288
<Skeleton sx={{ borderRadius: "0.4rem", width: "3.2rem", height: "2rem", display: "inline-block" }}></Skeleton>
10389
) : (
104-
<>{session0And1Data.marks ? formatLargeNumber(session0And1Data.marks, 2) : "--"}</>
90+
<>{session2Data.carry ? formatLargeNumber(session2Data.carry, 2) : "--"}</>
10591
)}
10692
</Typography>
10793
<Link underline="always" href={SESSION_AIRDROP_LINK} className="font-developer !text-inherit !text-[1.4rem] !font-normal">

src/app/sessions/Protocols/ProtocolCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const ProtocolCard = props => {
2323
walletCurrentAddress,
2424
]) as any
2525

26-
const marks = protocolMarksMap?.[project] ?? "0"
26+
const marks = protocolMarksMap?.[project]
2727

2828
return (
2929
<Link href={href} target="_blank" rel="noopener noreferrer">

src/app/sessions/Protocols/protocolList.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const DECENTRALIZED_EXCHANGES_DATA: ProtocolData = {
2929
project: "Ambient",
3030
logoURL: "https://scroll-eco-list.netlify.app/logos/Ambient%20Finance.png",
3131
href: "https://ambient.finance/",
32+
upcoming: true,
3233
},
3334
{
3435
name: "Maverick",
@@ -61,8 +62,8 @@ const DECENTRALIZED_EXCHANGES_DATA: ProtocolData = {
6162
// href: "https://scribe.exchange/",
6263
// },
6364
{
64-
name: "Syncswap",
65-
project: "Syncswap",
65+
name: "SyncSwap",
66+
project: "SyncSwap",
6667
logoURL: "https://scroll-eco-list.netlify.app/logos/Syncswap.png",
6768
href: "https://syncswap.xyz/",
6869
upcoming: true,

0 commit comments

Comments
 (0)