mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 05:37:56 +00:00
debug: add console logs for trust score calculation
This commit is contained in:
+12
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user