From 2c0d265ff5c3ea9e3ed56fdb24cdd2301abba617 Mon Sep 17 00:00:00 2001 From: Fringg Date: Sat, 7 Feb 2026 03:36:31 +0300 Subject: [PATCH] fix: remove incorrect ruble top-up prompt from fortune wheel Trial users saw an "insufficient balance" prompt suggesting to top up rubles, but the wheel only accepts Telegram Stars (via invoice) or subscription days. Stars payment via invoice doesn't require ruble balance, so the spin button should not be disabled for it. --- src/pages/Wheel.tsx | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/src/pages/Wheel.tsx b/src/pages/Wheel.tsx index 6a2cca0..1bb03f1 100644 --- a/src/pages/Wheel.tsx +++ b/src/pages/Wheel.tsx @@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next'; import { wheelApi, type SpinResult, type SpinHistoryItem } from '../api/wheel'; import FortuneWheel from '../components/wheel/FortuneWheel'; import WheelLegend from '../components/wheel/WheelLegend'; -import InsufficientBalancePrompt from '../components/InsufficientBalancePrompt'; import { usePlatform, useHaptic } from '@/platform'; import { useNotify } from '@/platform/hooks/useNotify'; import { Card } from '@/components/data-display/Card/Card'; @@ -461,11 +460,13 @@ export default function Wheel() { const daysEnabled = config.spin_cost_days_enabled && config.spin_cost_days; const bothMethodsAvailable = !!(starsEnabled && daysEnabled); + // Stars via Telegram invoice don't require ruble balance, so only check daily limit + const dailyLimitReached = config.daily_limit > 0 && config.user_spins_today >= config.daily_limit; const spinDisabled = - !config.can_spin || isSpinning || isPayingStars || - (config.daily_limit > 0 && config.user_spins_today >= config.daily_limit); + dailyLimitReached || + (paymentType === 'telegram_stars' ? !starsEnabled : !config.can_spin); return (
@@ -570,25 +571,21 @@ export default function Wheel() { )} - {/* Cannot spin hint */} - {!config.can_spin && !isSpinning && ( - <> - {config.can_spin_reason === 'daily_limit_reached' ? ( -
-

{t('wheel.errors.dailyLimitReached')}

-
- ) : config.can_spin_reason === 'insufficient_balance' ? ( - - ) : ( -
-

{t('wheel.errors.cannotSpin')}

-
- )} - + {/* Cannot spin hint — only show for days payment (Stars via invoice always works) */} + {!isSpinning && paymentType !== 'telegram_stars' && !config.can_spin && ( +
+

+ {config.can_spin_reason === 'daily_limit_reached' + ? t('wheel.errors.dailyLimitReached') + : t('wheel.errors.cannotSpin')} +

+
+ )} + {/* Daily limit hint for Stars payment (not covered by can_spin check) */} + {!isSpinning && paymentType === 'telegram_stars' && dailyLimitReached && ( +
+

{t('wheel.errors.dailyLimitReached')}

+
)} {/* Inline Result Card */}