From 2acce12533a318c9a3048f07f7f3056519155747 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Wed, 16 Apr 2025 10:15:09 +0200 Subject: [PATCH] Adjust text for success page --- frontend/src/pages/success/index.tsx | 27 ++++++++++++++------------- frontend/src/translations/en.json | 16 +++++++++++----- frontend/src/translations/pt.json | 16 +++++++++++----- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/frontend/src/pages/success/index.tsx b/frontend/src/pages/success/index.tsx index 0a1bddd28..47500eda9 100644 --- a/frontend/src/pages/success/index.tsx +++ b/frontend/src/pages/success/index.tsx @@ -8,6 +8,7 @@ import { FiatToken } from 'shared'; import { useRampSubmission } from '../../hooks/ramp/useRampSubmission'; import { useRampExecutionInput } from '../../stores/rampStore'; import { useRampFormStore } from '../../stores/ramp/useRampFormStore'; +import { useRampDirection } from '../../stores/rampDirectionStore'; const Checkmark = () => (
@@ -20,34 +21,34 @@ export const SuccessPage = () => { const { finishOfframping } = useRampSubmission(); const executionInput = useRampExecutionInput(); const { fiatToken } = useRampFormStore(); + const rampDirection = useRampDirection(); + const isOnramp = rampDirection === 'onramp'; const transactionId = executionInput?.quote?.id; const ARRIVAL_TEXT_BY_TOKEN: Record = { - [FiatToken.EURC]: t('pages.success.arrivalText.EURC'), - [FiatToken.ARS]: t('pages.success.arrivalText.ARS'), - [FiatToken.BRL]: t('pages.success.arrivalText.BRL'), + [FiatToken.EURC]: t('pages.success.arrivalText.sell.EURC'), + [FiatToken.ARS]: t('pages.success.arrivalText.sell.ARS'), + [FiatToken.BRL]: t('pages.success.arrivalText.sell.BRL'), }; - const arrivalText = ARRIVAL_TEXT_BY_TOKEN[fiatToken] || t('pages.success.arrivalText.default'); + const arrivalTextBuy = t('pages.success.arrivalText.buy'); + const arrivalTextSell = ARRIVAL_TEXT_BY_TOKEN[fiatToken] || t('pages.success.arrivalText.sell.default'); return (
- {/* Removed items-center from Box for overall container */} - {/* Centering container for Checkmark */}
- {/* Wrapper div for left-aligned content with padding */}
{' '} - {/* Added padding to match EmailForm */} -

{t('pages.success.title')}

{' '} - {/* Changed text-center to text-left */} - {/* Removed pink divider */} -

{arrivalText}

{' '} - {/* Changed text-center to text-left, updated color/style */} +

+ {t(`pages.success.title.${isOnramp ? 'buy' : 'sell'}`)} +

{' '} +

+ {isOnramp ? arrivalTextBuy : arrivalTextSell} +

{' '}
diff --git a/frontend/src/translations/en.json b/frontend/src/translations/en.json index f730f3b3a..b9cde5be4 100644 --- a/frontend/src/translations/en.json +++ b/frontend/src/translations/en.json @@ -38,13 +38,19 @@ "brlaTeleport": "Transferring newly minted assets to Moonbeam" }, "success": { - "title": "All set! The withdrawal has been sent to your bank.", + "title": { + "buy": "All set! Your tokens are on their way.", + "sell": "All set! The withdrawal has been sent to your bank." + }, "returnHome": "Return Home", "arrivalText": { - "EURC": "Funds will be received in 1 min (Instant SEPA) or 2 days (Standard SEPA). SEPA type dependent on the recipient bank support.", - "ARS": "Your funds will arrive in your bank account in a few minutes.", - "BRL": "Your funds were sent via PIX and are now in your bank account.", - "default": "Your funds will arrive in your bank account soon." + "buy": "The tokens will arrive in your wallet in a few minutes.", + "sell": { + "EURC": "Funds will be received in 1 min (Instant SEPA) or 2 days (Standard SEPA). SEPA type dependent on the recipient bank support.", + "ARS": "Your funds will arrive in your bank account in a few minutes.", + "BRL": "Your funds were sent via PIX and are now in your bank account.", + "default": "Your funds will arrive in your bank account soon." + } } }, "swap": { diff --git a/frontend/src/translations/pt.json b/frontend/src/translations/pt.json index e5c6d4e22..344563d32 100644 --- a/frontend/src/translations/pt.json +++ b/frontend/src/translations/pt.json @@ -38,13 +38,19 @@ "brlaTeleport": "Transferindo ativos recém-criados para Moonbeam" }, "success": { - "title": "Tudo certo! Enviamos o saque para sua conta bancária.", + "title": { + "buy": "Tudo certo! Seus tokens estão a caminho.", + "sell": "Tudo certo! Enviamos o saque para sua conta bancária." + }, "returnHome": "Voltar para a página inicial.", "arrivalText": { - "EURC": "Você receberá os fundos em até 1 minuto (SEPA Instantâneo) ou em até 2 dias (SEPA Padrão), dependendo do seu banco.", - "ARS": "Em breve os fundos estarão disponíveis em sua conta bancária.", - "BRL": "Em breve os fundos estarão disponíveis em sua conta bancária..", - "default": "Em breve os fundos estarão disponíveis em sua conta bancária." + "buy": "Os tokens chegarão à sua carteira em alguns minutos.", + "sell": { + "EURC": "Você receberá os fundos em até 1 minuto (SEPA Instantâneo) ou em até 2 dias (SEPA Padrão), dependendo do seu banco.", + "ARS": "Em breve os fundos estarão disponíveis em sua conta bancária.", + "BRL": "Em breve os fundos estarão disponíveis em sua conta bancária..", + "default": "Em breve os fundos estarão disponíveis em sua conta bancária." + } } }, "swap": {