diff --git a/src/pages/TopUpAmount.tsx b/src/pages/TopUpAmount.tsx index fb18324..3032224 100644 --- a/src/pages/TopUpAmount.tsx +++ b/src/pages/TopUpAmount.tsx @@ -87,7 +87,7 @@ export default function TopUpAmount() { const queryClient = useQueryClient(); const { formatAmount, currencySymbol, convertAmount, convertToRub, targetCurrency } = useCurrency(); - const { openInvoice } = usePlatform(); + const { openInvoice, openTelegramLink, openLink } = usePlatform(); const haptic = useHaptic(); const inputRef = useRef(null); @@ -281,6 +281,15 @@ export default function TopUpAmount() { : convertAmount(rub).toFixed(currencyDecimals); const isPending = topUpMutation.isPending || starsPaymentMutation.isPending; + const handleOpenPayment = () => { + if (!paymentUrl) return; + if (paymentUrl.includes('t.me/')) { + openTelegramLink(paymentUrl); + } else { + openLink(paymentUrl); + } + }; + const handleCopyUrl = async () => { if (!paymentUrl) return; try { @@ -478,15 +487,14 @@ export default function TopUpAmount() {

{t('balance.clickToOpenPayment')}

- {t('balance.openPaymentPage')} - +