Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
Merged
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
2 changes: 1 addition & 1 deletion src/components/aidaos/DAOTabLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function DAOTabLayout({
</div>
</div>
) : (
<div className="bg-card/30 backdrop-blur-sm">{children}</div>
<div className="bg-card/30">{children}</div>
)}
</div>
</div>
Expand Down
27 changes: 13 additions & 14 deletions src/components/aidaos/RootDAOPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ export function RootDAOPage({ children, daoName }: RootDAOPageProps) {
// };

return (
<div className="flex flex-col w-full">
<main className="overflow-y-auto overflow-x-hidden">
<div className="flex flex-col w-full min-h-0">
<div className="flex-1">
<div className=" sm:px-6 lg:px-14 py-4 mx-auto w-full">
<div className="bg-background p-4 sm:p-6 rounded-sm mb-6">
{/* <div className="flex flex-col sm:flex-row items-start sm:items-center gap-4 mb-4">
Expand Down Expand Up @@ -527,24 +527,23 @@ export function RootDAOPage({ children, daoName }: RootDAOPageProps) {
<TwitterCard
name="AIBTC"
username="aibtcdev"
tweet={`AIBTC order — LA interviews 🌴
tweet={`AIBTC order — community call recruiting 📡

hit the streets of LA and record a video asking a stranger:
invite talented builders to weekly aibtc community calls

• "What do you love about LA?"
• "What's one thing you'd fix about LA?"
1️⃣ tag someone building with ai and btc
2️⃣ mention what they're building
3️⃣ link to the aibtc weekly call

quote this post with the video and neighborhood you were in
approved entries earn btc

approved entries earn $50 BTC

details in next post`}
date="Nov 25, 2025"
details in thread 👇`}
date="Dev 10, 2025"
// time="8:14 PM"
avatarUrl="/logos/aibtcdev-avatar-250px.png"
verified={true}
// link="https://x.com/aibtcdev/status/1990455534554841152"
title="The Current Order"
// link="https://x.com/aibtcdev/status/1995580321014976795"
title="AIBTC Current Order"
/>
</div>
</div>
Expand Down Expand Up @@ -625,7 +624,7 @@ details in next post`}
</DialogContent>
</Dialog>
</div>
</main>
</div>
</div>
);
}
8 changes: 4 additions & 4 deletions src/components/proposals/ProposalCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import { useProposalStatus } from "@/hooks/useProposalStatus";
import { useProposalVote } from "@/hooks/useProposalVote";
import { Button } from "@/components/ui/button";
import { RefreshCw, AlertCircle } from "lucide-react";
import { motion } from "framer-motion";
import { safeNumberFromBigInt } from "@/utils/proposal";
import { cn } from "@/lib/utils";
import { motion } from "framer-motion";

interface ProposalCardProps {
proposal: Proposal | ProposalWithDAO;
Expand Down Expand Up @@ -101,7 +101,7 @@ export default function ProposalCard({
const quorumPercentage = safeNumberFromBigInt(proposal.voting_quorum);
const thresholdPercentage = safeNumberFromBigInt(proposal.voting_threshold);

// Calculate if requirements are met
// Calculate if requirements are met (using exact floating point comparison)
const metQuorum = calculations.participationRate >= quorumPercentage;
const metThreshold =
calculations.totalVotes > 0
Expand All @@ -125,7 +125,7 @@ export default function ProposalCard({
}

if (isActive) {
return percentage !== undefined ? `${percentage.toFixed(1)}%` : "0%";
return percentage !== undefined ? `${percentage.toFixed(4)}%` : "0%";
}

return met ? "Passed" : "Failed";
Expand Down Expand Up @@ -162,7 +162,7 @@ export default function ProposalCard({
href={`/proposals/${proposal.id}`}
className="block group cursor-pointer"
>
<div className="py-4 px-8 rounded-sm mb-3 bg-background group-hover:bg-black transition-colors duration-300 max-w-full overflow-hidden">
<div className="py-4 px-8 rounded-sm mb-3 bg-background group-hover:bg-black transition-colors duration-300 max-w-full">
{/* Header */}
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between mb-3 sm:mb-4 gap-3">
<div className="flex-1 min-w-0">
Expand Down
4 changes: 2 additions & 2 deletions src/components/proposals/ProposalHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function ProposalHeader({ proposal }: ProposalHeaderProps) {
const quorumPercentage = safeNumberFromBigInt(proposal.voting_quorum);
const thresholdPercentage = safeNumberFromBigInt(proposal.voting_threshold);

// Calculate if requirements are met
// Calculate if requirements are met (using exact floating point comparison)
const metQuorum = calculations.participationRate >= quorumPercentage;
const metThreshold =
calculations.totalVotes > 0
Expand All @@ -70,7 +70,7 @@ export function ProposalHeader({ proposal }: ProposalHeaderProps) {
// Helper function to get status text
const getStatusText = (isMet: boolean, percentage: number) => {
if (isMet) return "Passed";
return `${percentage.toFixed(1)}%`;
return `${percentage.toFixed(4)}%`;
};

// Get DAO/token image - prioritize token image, fallback to DAO image if available
Expand Down
4 changes: 2 additions & 2 deletions src/components/proposals/VotesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const VotesTable = ({ proposalId, limit }: VotesTableProps) => {
return (
<Badge variant="secondary" className="text-xs">
{typeof finalScore === "number"
? finalScore.toFixed(1)
? finalScore.toFixed(4)
: String(finalScore)}
</Badge>
);
Expand All @@ -82,7 +82,7 @@ const VotesTable = ({ proposalId, limit }: VotesTableProps) => {
return (
<Badge variant="secondary" className="text-xs">
{typeof parsedScore === "number"
? parsedScore.toFixed(1)
? parsedScore.toFixed(4)
: String(parsedScore)}
</Badge>
);
Expand Down
14 changes: 7 additions & 7 deletions src/components/proposals/VotingProgressChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const VotingProgressChart = ({
const quorumPercentage = safeNumberFromBigInt(proposal.voting_quorum);
const thresholdPercentage = safeNumberFromBigInt(proposal.voting_threshold);

// Calculate if requirements are met
// Calculate if requirements are met (using exact floating point comparison)
const metQuorum = calculations.participationRate >= quorumPercentage;
const metThreshold =
calculations.totalVotes > 0
Expand Down Expand Up @@ -127,7 +127,7 @@ const VotingProgressChart = ({
return "Met";
}
return percentage !== undefined
? `In Progress (${percentage.toFixed(1)}%)`
? `In Progress (${percentage.toFixed(4)}%)`
: "In Progress";
}

Expand Down Expand Up @@ -492,7 +492,7 @@ const VotingProgressChart = ({
decimals={8}
variant="abbreviated"
/>{" "}
({enhancedCalculations.votesForPercent.toFixed(1)}%)
({enhancedCalculations.votesForPercent.toFixed(4)}%)
</span>
) : (
<span className="text-destructive">Failed to fetch</span>
Expand All @@ -507,7 +507,7 @@ const VotingProgressChart = ({
decimals={8}
variant="abbreviated"
/>{" "}
({enhancedCalculations.votesAgainstPercent.toFixed(1)}%)
({enhancedCalculations.votesAgainstPercent.toFixed(4)}%)
</span>
) : (
<span className="text-destructive">Failed to fetch</span>
Expand Down Expand Up @@ -592,7 +592,7 @@ const VotingProgressChart = ({
<div className="flex items-center gap-1">
<div className="w-2 h-2 bg-green-500 rounded-sm flex-shrink-0" />
<span className="break-words">
Approval: {enhancedCalculations.approvalRate.toFixed(1)}% of votes
Approval: {enhancedCalculations.approvalRate.toFixed(4)}% of votes
cast
</span>
</div>
Expand Down Expand Up @@ -658,7 +658,7 @@ const VotingProgressChart = ({
</span>
</div>
<div className="text-xs text-muted-foreground">
{enhancedCalculations.participationRate.toFixed(1)}% of{" "}
{enhancedCalculations.participationRate.toFixed(4)}% of{" "}
{enhancedCalculations.quorumPercentage}% required
</div>
</div>
Expand Down Expand Up @@ -715,7 +715,7 @@ const VotingProgressChart = ({
</span>
</div>
<div className="text-xs text-muted-foreground">
{enhancedCalculations.approvalRate.toFixed(1)}% of{" "}
{enhancedCalculations.approvalRate.toFixed(4)}% of{" "}
{enhancedCalculations.thresholdPercentage}% required
</div>
</div>
Expand Down
8 changes: 3 additions & 5 deletions src/config/features.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// when enabled will show only a single DAO throughout the app
export const enableSingleDaoMode = true;
// only required when single DAO mode is enabled
export const singleDaoName = "AIBTC-LAX";

// Reward configuration
// Reward amount in USD for each passed proposal
export const rewardPerPassedProposal = 50;
export const singleDaoName = "AIBTC-R1";
// reward amount in USD for each passed proposal
export const rewardPerPassedProposal = 1;