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 */}