mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 06:47:55 +00:00
91070435d5
Until runtime upgrade is deployed, calculate scores on frontend: shared/lib/scores.ts: - getFrontendStakingScore: Read stake from Relay Chain, track in localStorage - getFrontendTrustScore: Calculate using pallet formula - getAllScoresWithFallback: Combined score fetching with fallback Formula (matching pezpallet-trust): - weighted_sum = staking*100 + referral*300 + perwerde*300 + tiki*300 - trust_score = (staking * weighted_sum) / 100 Components updated: - AccountBalance.tsx: Use getAllScoresWithFallback - HeroSection.tsx: Use getTrustScoreWithFallback