mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 09:07:55 +00:00
4e85e28bce
Changed getReferralScore() to read from pallet_referral::ReferralCount instead of non-existent pallet_trust::ReferralScores. Changes: - Read referral count from api.query.referral.referralCount - Implement proper score calculation logic: * 0 referrals: 0 points * 1-5 referrals: count × 4 points * 6-20 referrals: 20 + (count - 5) × 2 points * 21+ referrals: capped at 50 points - Add detailed documentation explaining score calculation - Remove warning spam in production (only warn in dev mode) This fixes the console warning "Referral scores not available in trust pallet" by using the actual pallet_referral storage that already exists and is properly maintained. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>