mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
Update fallback handling for invoice URL in Wheel
This commit is contained in:
@@ -299,20 +299,21 @@ export default function Wheel() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// openInvoice not available - show error
|
// Fallback: open invoice URL in Telegram (browser or unsupported WebApp version)
|
||||||
setIsPayingStars(false);
|
setIsPayingStars(false);
|
||||||
|
window.open(data.invoice_url, '_blank', 'noopener,noreferrer');
|
||||||
setSpinResult({
|
setSpinResult({
|
||||||
success: false,
|
success: true,
|
||||||
prize_id: null,
|
prize_id: null,
|
||||||
prize_type: null,
|
prize_type: null,
|
||||||
prize_value: 0,
|
prize_value: 0,
|
||||||
prize_display_name: '',
|
prize_display_name: '',
|
||||||
emoji: '😔',
|
emoji: '⭐',
|
||||||
color: '#EF4444',
|
color: '#8B5CF6',
|
||||||
rotation_degrees: 0,
|
rotation_degrees: 0,
|
||||||
message: t('wheel.errors.starsNotAvailable'),
|
message: t('wheel.starsPaymentRedirected'),
|
||||||
promocode: null,
|
promocode: null,
|
||||||
error: 'stars_not_available',
|
error: null,
|
||||||
});
|
});
|
||||||
setShowResultModal(true);
|
setShowResultModal(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user