From b0c1a80ade036c9d3737ef10a7951f1f1104424f Mon Sep 17 00:00:00 2001 From: Robert Schlittler Date: Wed, 8 Jan 2025 13:14:26 +0100 Subject: [PATCH] refactor(frontend): consolidate status texts for txns --- .../transactions/BtcTransactionModal.svelte | 8 +------- src/frontend/src/lib/i18n/en.json | 8 ++++---- src/frontend/src/lib/types/i18n.d.ts | 12 ++++++++---- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/frontend/src/btc/components/transactions/BtcTransactionModal.svelte b/src/frontend/src/btc/components/transactions/BtcTransactionModal.svelte index 719aeaa3aa..e066123f38 100644 --- a/src/frontend/src/btc/components/transactions/BtcTransactionModal.svelte +++ b/src/frontend/src/btc/components/transactions/BtcTransactionModal.svelte @@ -72,12 +72,6 @@ {$i18n.transaction.text.status} - {`${ - status === 'pending' - ? $i18n.transaction.text.pending - : status === 'unconfirmed' - ? $i18n.transaction.text.unconfirmed - : $i18n.transaction.text.confirmed - }`} + {`${$i18n.transaction.status[status]}`} diff --git a/src/frontend/src/lib/i18n/en.json b/src/frontend/src/lib/i18n/en.json index 1705a51a5f..fbdc27a5f7 100644 --- a/src/frontend/src/lib/i18n/en.json +++ b/src/frontend/src/lib/i18n/en.json @@ -659,16 +659,16 @@ "to_copied": "To address copied to clipboard.", "block": "Block", "interacted_with": "Interacted With (To)", - "pending": "Pending...", - "unconfirmed": "Unconfirmed", - "confirmed": "Confirmed", "status": "Status", "confirmations": "Confirmations" }, "status": { + "confirmed": "Confirmed", "included": "Included", + "finalised": "Finalised", + "pending": "Pending...", "safe": "Safe", - "finalised": "Finalised" + "unconfirmed": "Unconfirmed" }, "label": { "reimbursement": "Reimbursement", diff --git a/src/frontend/src/lib/types/i18n.d.ts b/src/frontend/src/lib/types/i18n.d.ts index 73e96b9c2a..4309465fd0 100644 --- a/src/frontend/src/lib/types/i18n.d.ts +++ b/src/frontend/src/lib/types/i18n.d.ts @@ -588,13 +588,17 @@ interface I18nTransaction { to_copied: string; block: string; interacted_with: string; - pending: string; - unconfirmed: string; - confirmed: string; status: string; confirmations: string; }; - status: { included: string; safe: string; finalised: string }; + status: { + confirmed: string; + included: string; + finalised: string; + pending: string; + safe: string; + unconfirmed: string; + }; label: { reimbursement: string; twin_token_sent: string;