Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit 68ddae2

Browse files
committed
update
1 parent 0c18a70 commit 68ddae2

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

src/components/aidaos/RootDAOPage.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import { getStacksAddress } from "@/lib/address";
4444
// import { useAgentAccount } from "@/hooks/useAgentAccount";
4545
// import { BalanceDisplay } from "@/components/reusables/BalanceDisplay";
4646
import { TwitterCard } from "@/components/twitter/TwitterCard";
47+
import { rewardPerPassedProposal } from "@/config/features";
4748

4849
// Network configuration
4950
const isMainnet = process.env.NEXT_PUBLIC_STACKS_NETWORK === "mainnet";
@@ -373,6 +374,10 @@ export function RootDAOPage({ children, daoName }: RootDAOPageProps) {
373374
return proposals.filter((proposal) => proposal.passed === true).length;
374375
}, [proposals]);
375376

377+
const totalRewards = useMemo(() => {
378+
return passedProposals * rewardPerPassedProposal;
379+
}, [passedProposals]);
380+
376381
if (isBasicLoading || !dao) {
377382
return (
378383
<main className="flex h-screen w-full items-center justify-center">
@@ -482,7 +487,9 @@ export function RootDAOPage({ children, daoName }: RootDAOPageProps) {
482487
</div>
483488
<div className="flex items-center gap-2">
484489
<span className="font-bold">Total Rewards:</span>
485-
<span className="font-medium">$4,005</span>
490+
<span className="font-medium">
491+
${totalRewards.toLocaleString()}
492+
</span>
486493
</div>
487494
</div>
488495
</div>

src/config/features.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
export const enableSingleDaoMode = true;
33
// only required when single DAO mode is enabled
44
export const singleDaoName = "AIBTC-NS1";
5+
6+
// Reward configuration
7+
// Reward amount in USD for each passed proposal
8+
export const rewardPerPassedProposal = 50;

src/services/metrics.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { supabase } from "./supabase";
2-
import { singleDaoName } from "@/config/features";
2+
import { singleDaoName, rewardPerPassedProposal } from "@/config/features";
33

44
export interface UserMetrics {
55
username: string;
@@ -178,7 +178,7 @@ export async function fetchAllUserMetrics(): Promise<UserMetrics[]> {
178178
failedProposals,
179179
pendingProposals,
180180
successRate,
181-
btcEarned: passedProposals * 50,
181+
btcEarned: passedProposals * rewardPerPassedProposal,
182182
});
183183
}
184184
);

0 commit comments

Comments
 (0)