From 362c3915d4fae08e6cbc1fe42e1682bd59eb4c58 Mon Sep 17 00:00:00 2001 From: jackstar12 Date: Wed, 8 Jan 2025 18:38:37 +0100 Subject: [PATCH] chore: move invalid json message to refund button --- src/components/RefundButton.tsx | 3 ++- src/i18n/i18n.ts | 6 +++--- src/pages/RefundExternal.tsx | 17 +++++------------ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/components/RefundButton.tsx b/src/components/RefundButton.tsx index 3aa75b30..b3a0a1ff 100644 --- a/src/components/RefundButton.tsx +++ b/src/components/RefundButton.tsx @@ -112,6 +112,7 @@ export const RefundEvm = (props: { const RefundButton = (props: { swap: Accessor; setRefundTxId?: Setter; + buttonOverride?: string; }) => { const { getSwap, @@ -338,7 +339,7 @@ const RefundButton = (props: { class="btn" disabled={!valid() || refundRunning()} onClick={() => refundAction()}> - {t("refund")} + {props.buttonOverride ?? t("refund")} diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index d59cebc6..d7645207 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -98,7 +98,7 @@ const dict = { "If any of the above applies to you, we strongly recommend downloading this refund file!", refund_swap: "Refund Swap", refund_a_swap_subline: - "Upload your refund file and reclaim your locked funds", + "Upload your Swap’s refund file, to refund a swap that is not available in this browser’s swap history.", refund_past_swaps: "Past swaps", refund_past_swaps_subline: "Swaps that got saved into your browsers storage", @@ -116,9 +116,9 @@ const dict = { refund_external_swap: "Refund External Swap", history_no_swaps: "Looks like you didn't do any swaps yet.", refund_address_header: - "Enter address of your {{ asset }} wallet to refund", + "Enter a {{ asset }} address to receive your refund on:", refund_address_header_no_asset: - "Enter address of your wallet to refund", + "Enter an address to receive your refund on:", refund_backup: "Backup", refund_import: "Import Backup", refund_clear: "Delete storage", diff --git a/src/pages/RefundExternal.tsx b/src/pages/RefundExternal.tsx index 5675e135..f6169945 100644 --- a/src/pages/RefundExternal.tsx +++ b/src/pages/RefundExternal.tsx @@ -99,19 +99,12 @@ const RefundBtcLike = () => { accept="application/json,image/png,imagine/jpg,image/jpeg" onChange={(e) => uploadChange(e)} /> - -
- -

- +

{t("refunded")}