Skip to content
Draft
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
18 changes: 14 additions & 4 deletions app/tokenomics/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ import {
Zap
} from 'lucide-react';

// Type definition for distribution map
type DistributionMap = {
team: { label: string; value: number; color: string };
investors: { label: string; value: number; color: string };
community: { label: string; value: number; color: string };
liquidity: { label: string; value: number; color: string };
marketing: { label: string; value: number; color: string };
reserve: { label: string; value: number; color: string };
};

// Simple explanations for each allocation type
const allocationExplanations = {
team: {
Expand Down Expand Up @@ -214,13 +224,13 @@ function TokenomicsPage() {
</div>
);

const getHealthScoreColor = (score) => {
const getHealthScoreColor = (score: number) => {
if (score >= 80) return 'text-green-600 bg-green-50 border-green-200';
if (score >= 60) return 'text-yellow-600 bg-yellow-50 border-yellow-200';
return 'text-red-600 bg-red-50 border-red-200';
};

const getHealthScoreIcon = (score) => {
const getHealthScoreIcon = (score: number) => {
if (score >= 80) return <Check className="w-5 h-5" />;
if (score >= 60) return <AlertTriangle className="w-5 h-5" />;
return <AlertTriangle className="w-5 h-5" />;
Expand Down Expand Up @@ -332,13 +342,13 @@ function TokenomicsPage() {
</div>
<Slider
value={[data.value]}
onValueChange={(value) => updateDistribution(key, value[0])}
onValueChange={(value) => updateDistribution(key as keyof DistributionMap, value[0])}
max={80}
step={1}
className="w-full"
/>
<div className="text-xs text-muted-foreground">
{allocationExplanations[key]?.recommendation}
{allocationExplanations[key as keyof typeof allocationExplanations]?.recommendation}
</div>
</div>
))}
Expand Down
3 changes: 2 additions & 1 deletion components/MultiWalletUSDTTopUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ interface MultiWalletUSDTTopUpProps {
userAddress?: string;
onCreditsUpdated?: () => void;
onClose?: () => void;
onTopUpSuccess?: (details: any) => void;
}

// Connected wallet detection
Expand All @@ -74,7 +75,7 @@ interface ConnectedWallets {
metamask: boolean;
}

export default function MultiWalletUSDTTopUp({ userAddress, onCreditsUpdated, onClose }: MultiWalletUSDTTopUpProps) {
export default function MultiWalletUSDTTopUp({ userAddress, onCreditsUpdated, onClose, onTopUpSuccess }: MultiWalletUSDTTopUpProps) {
// Wallet connections
const solanaWallet = useWallet();
const algorandWallet = useAlgorandWallet();
Expand Down
8 changes: 5 additions & 3 deletions components/WalletSpecificCreditTopUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ export default function WalletSpecificCreditTopUp({ userAddress, onCreditsUpdate
</CardContent>
</Card>
</CardContent>
</div>
</Card>

{/* Enhanced Benefits Section */}
<Card className="relative overflow-hidden bg-gradient-to-br from-green-500/5 via-background to-emerald-500/5 border-green-500/20">
Expand Down Expand Up @@ -1046,8 +1046,10 @@ export default function WalletSpecificCreditTopUp({ userAddress, onCreditsUpdate
</div>
</div>
</div>
</CardContent>
</Card>

<div className="space-y-4">
<div className="flex items-start gap-4 p-4 rounded-lg bg-muted/10 hover:bg-muted/20 transition-colors">
<div className="w-10 h-10 rounded-full bg-blue-500/10 flex items-center justify-center flex-shrink-0">
<Shield className="w-5 h-5 text-blue-400" />
</div>
<div>
Expand Down