diff --git a/shared/lib/scores.ts b/shared/lib/scores.ts index 45b194ea..a6165a4f 100644 --- a/shared/lib/scores.ts +++ b/shared/lib/scores.ts @@ -781,7 +781,16 @@ export async function getFrontendTrustScore( const stakingScore = stakingResult.score; - // If staking score is 0, trust score is 0 (matches pallet logic) + console.log('🔍 getFrontendTrustScore debug:', { + address: address.slice(0, 8) + '...', + stakingScore, + referralScore, + perwerdeScore, + tikiScore, + stakedHez: stakingResult.stakedHez, + }); + + // Ger staking 0 be, trust jî 0 be (matches pallet logic) if (stakingScore === 0) { return { ...emptyResult, @@ -803,6 +812,8 @@ export async function getFrontendTrustScore( // trust_score = (staking * weighted_sum) / 100 const trustScore = Math.floor((stakingScore * weightedSum) / SCORE_MULTIPLIER_BASE); + console.log('✅ Trust score calculated:', { weightedSum, trustScore }); + return { trustScore, stakingScore,