diff --git a/app/tokenomics/page.tsx b/app/tokenomics/page.tsx index ee3fa06..c223d17 100644 --- a/app/tokenomics/page.tsx +++ b/app/tokenomics/page.tsx @@ -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: { @@ -214,13 +224,13 @@ function TokenomicsPage() { ); - 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 ; if (score >= 60) return ; return ; @@ -332,13 +342,13 @@ function TokenomicsPage() { updateDistribution(key, value[0])} + onValueChange={(value) => updateDistribution(key as keyof DistributionMap, value[0])} max={80} step={1} className="w-full" />
- {allocationExplanations[key]?.recommendation} + {allocationExplanations[key as keyof typeof allocationExplanations]?.recommendation}
))} diff --git a/components/MultiWalletUSDTTopUp.tsx b/components/MultiWalletUSDTTopUp.tsx index 3f2fe23..44f04d1 100644 --- a/components/MultiWalletUSDTTopUp.tsx +++ b/components/MultiWalletUSDTTopUp.tsx @@ -65,6 +65,7 @@ interface MultiWalletUSDTTopUpProps { userAddress?: string; onCreditsUpdated?: () => void; onClose?: () => void; + onTopUpSuccess?: (details: any) => void; } // Connected wallet detection @@ -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(); diff --git a/components/WalletSpecificCreditTopUp.tsx b/components/WalletSpecificCreditTopUp.tsx index d66a232..14c4287 100644 --- a/components/WalletSpecificCreditTopUp.tsx +++ b/components/WalletSpecificCreditTopUp.tsx @@ -947,7 +947,7 @@ export default function WalletSpecificCreditTopUp({ userAddress, onCreditsUpdate - + {/* Enhanced Benefits Section */} @@ -1046,8 +1046,10 @@ export default function WalletSpecificCreditTopUp({ userAddress, onCreditsUpdate - - + +
+
+