From ba046636b83f8c096d8ea49b073dc95e306606c0 Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Sat, 7 Feb 2026 01:39:11 +0300 Subject: [PATCH] debug: add console logs for trust score calculation --- shared/lib/scores.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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,