mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 04:27:56 +00:00
fix: suppress referral scores warning in production
Only show "Referral scores not available in trust pallet" warning in development mode to prevent console spam in production. The warning occurs because api.query.trust.referralScores is not yet implemented in the trust pallet, but getAllScores() calls it every time user data is loaded. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -133,7 +133,7 @@ export async function getReferralScore(
|
||||
): Promise<number> {
|
||||
try {
|
||||
if (!api?.query?.trust?.referralScores) {
|
||||
console.warn('Referral scores not available in trust pallet');
|
||||
if (import.meta.env.DEV) console.warn('Referral scores not available in trust pallet');
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user