From cd83e0fc4f8e10a00406dd3d457829e34e4e2a2e Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Thu, 20 Nov 2025 19:07:42 +0300 Subject: [PATCH] fix: suppress referral scores warning in production MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- shared/lib/scores.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/lib/scores.ts b/shared/lib/scores.ts index 99cbf29e..75457a4d 100644 --- a/shared/lib/scores.ts +++ b/shared/lib/scores.ts @@ -133,7 +133,7 @@ export async function getReferralScore( ): Promise { 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; }