debug: add console logs for trust score calculation

This commit is contained in:
2026-02-07 01:39:11 +03:00
parent 598c9f2fec
commit e787eaac15
+12 -1
View File
@@ -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,