diff --git a/src/components/RefundButton.tsx b/src/components/RefundButton.tsx index b3a0a1ff..a2c0da0f 100644 --- a/src/components/RefundButton.tsx +++ b/src/components/RefundButton.tsx @@ -9,8 +9,9 @@ import { Setter, Show, Switch, + createEffect, createResource, - createSignal, createEffect + createSignal, } from "solid-js"; import { ChainSwap, SubmarineSwap } from "src/utils/swapCreator"; @@ -214,30 +215,32 @@ const RefundButton = (props: { setRefundRunning(false); }; - const [lockupTransaction, {refetch: refetchLockup}] = createResource(async () => { - if (!props.swap()) { - return undefined; - } + const [lockupTransaction, { refetch: refetchLockup }] = createResource( + async () => { + if (!props.swap()) { + return undefined; + } - const transactionToRefund = await getLockupTransaction( - props.swap().id, - props.swap().type, - ); + const transactionToRefund = await getLockupTransaction( + props.swap().id, + props.swap().type, + ); - // show refund ETA for legacy swaps - if (props.swap().version !== OutputType.Taproot) { - setTimeoutEta(transactionToRefund.timeoutEta); - setTimeoutBlockheight(transactionToRefund.timeoutBlockHeight); - } + // show refund ETA for legacy swaps + if (props.swap().version !== OutputType.Taproot) { + setTimeoutEta(transactionToRefund.timeoutEta); + setTimeoutBlockheight(transactionToRefund.timeoutBlockHeight); + } - return transactionToRefund; - }); + return transactionToRefund; + }, + ); createEffect(() => { - if(props.swap() !== undefined) { + if (props.swap() !== undefined) { refetchLockup(null); } - }) + }); const [preimageHash] = createResource(async () => { return (await decodeInvoice((props.swap() as SubmarineSwap).invoice)) diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index d7645207..ffc72505 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -112,7 +112,7 @@ const dict = { refund_external_scanning_rsk: "Scanning for refundable swaps in your Rootstock Wallet...", connected_wallet_no_swaps: - "The connected Rootstock Wallet does NOT contain any refundable swaps.", + "The connected Rootstock Wallet does not contain any refundable swaps.", refund_external_swap: "Refund External Swap", history_no_swaps: "Looks like you didn't do any swaps yet.", refund_address_header: @@ -339,12 +339,24 @@ const dict = { backup_refund_list_clear_history: "die Browser Daten gelöscht werden", backup_refund_skip: "Falls einer dieser Punkte zutrifft, empfehlen wir ausdrücklich die Rückerstattungsdatei herunterzuladen!", - refund_swap: "Swap erstatten", + refund_swap: "Swap Erstatten", refund_a_swap_subline: - "Lade deine Rückerstattungsdatei hoch und hole dir deine Bitcoin aus einem fehlgeschlagenen Swap zurück", + "Lade deine Rückerstattungsdatei hoch und hole dir deine Bitcoin aus einem fehlgeschlagenen Swap zurück.", refund_past_swaps: "Historische Swaps", refund_past_swaps_subline: "Swaps, die in deinem Browser gespeichert wurden", + no_refundable_swaps: + "Keine erstattungsfähigen Swaps in Browserverlauf gefunden", + cant_find_swap: "Swap nicht gefunden?", + refund_external_explainer: + "Versuchen Sie, einen externen Swap über eine Rückerstattungsdatei und andere Notfallmethoden zu erstatten", + refund_external_explainer_rsk: + "Verbinden Sie Ihr Rootstock Wallet, um nach erstattungsfähigen Swaps zu suchen, die nicht im Swap-Verlauf dieses Browsers gespeichert sind..", + refund_external_scanning_rsk: + "Scanne nach erstattungsfähigen Swaps in Rootstock-Wallet...", + connected_wallet_no_swaps: + "Das angeschlossene Rootstock Wallet enthält keine erstattungsfähigen Swaps.", + refund_external_swap: "Externen Swap rückerstatten", history_no_swaps: "Es sieht so aus, als hättest du noch nicht geswappt.", refund_address_header: "Adresse deines {{ asset }} Wallets eingeben", @@ -575,13 +587,24 @@ const dict = { backup_refund_list_clear_history: "borra tu historial de navegación", backup_refund_skip: "Si alguno de los puntos anteriores le afecta, le recomendamos que descargue el archivo de reembolso.", - refund_a_swap: "Reembolsar un intercambio", - refund_swap: "Reembolsar intercambio {{ id }}", + refund_swap: "Reembolsar Intercambio", refund_a_swap_subline: - "Cargue su archivo de reembolso y recupere sus fondos bloqueados", + "Cargue su archivo de reembolso y recupere sus fondos bloqueados.", refund_past_swaps: "Intercambios anteriores", refund_past_swaps_subline: "Intercambios que se guardaron en el almacenamiento del navegador", + no_refundable_swaps: + "No se han encontrado swaps reembolsables en el historial de tu navegador", + cant_find_swap: "¿No encuentra su intercambio?", + refund_external_explainer: + "Intenta reembolsar un swap externo mediante el archivo de reembolso y otros métodos de emergencia.", + refund_external_explainer_rsk: + "Conecta tu monedero Rootstock para buscar swaps reembolsables que no estén guardados en el historial de swaps de este navegador.", + refund_external_scanning_rsk: + "Escaneando en busca de swaps reembolsables en su monedero Rootstock...", + connected_wallet_no_swaps: + "El monedero Rootstock conectada no contiene ningún swap reembolsable.", + refund_external_swap: "Reembolsar Swap Externo", history_no_swaps: "Parece que aún no has realizado ningún intercambio.", refund_address_header: "Introduzca la dirección de tu monedero {{ asset }} para reembolsar", @@ -807,11 +830,21 @@ const dict = { backup_refund_list_tor: "正在使用Tor浏览器", backup_refund_list_clear_history: "清除您的浏览历史记录", backup_refund_skip: "如果您符合以上任何条件,强烈建议下载此退款文件!", - refund_a_swap: "退还交换", - refund_swap: "退交换{{ id }}", + refund_swap: "退还交换", refund_a_swap_subline: "上传您的退款文件,取回被锁定的资金", refund_past_swaps: "过去的交换", refund_past_swaps_subline: "保存在浏览器存储中的交换", + no_refundable_swaps: "在您的浏览器历史中未发现可退款的交换。", + cant_find_swap: "找不到您的交换?", + refund_external_explainer: + "尝试通过退款文件和其他紧急方法退款外部交换。", + refund_external_explainer_rsk: + "连接您的 Rootstock 钱包,扫描未保存在此浏览器交换历史记录中的可退款交换。", + refund_external_scanning_rsk: + "正在扫描您的 Rootstock 钱包中的可退款掉期。。。", + connected_wallet_no_swaps: + "已连接的 Rootstock 钱包不包含任何可退款掉期。", + refund_external_swap: "退款外部交换", history_no_swaps: "看起来您还没有进行任何交换。", refund_address_header: "输入要退款的 {{ asset }} 钱包地址", refund_address_header_no_asset: "输入要退款的钱包地址", @@ -1026,12 +1059,23 @@ const dict = { backup_refund_list_clear_history: "ブラウザ履歴を消した場合", backup_refund_skip: "もし以上にあてはまる場合、返金ファイルをダウンロードすることを強くお勧めします!", - refund_a_swap: "スワップを返金する", - refund_swap: "スワップの返金 {{ id }}", + refund_swap: "スワップを返金する", refund_a_swap_subline: "返金ファイルをアップロードし、ロックされた資金を回収します", refund_past_swaps: "過去のスワップ", refund_past_swaps_subline: "ブラウザのストレージに保存されたスワップ", + no_refundable_swaps: + "ブラウザの履歴に返金可能なスワップが見つかりません。", + cant_find_swap: "スワップが見つからない?", + refund_external_explainer: + "払い戻しファイルやその他の緊急手段を使って外部スワップを払い戻してみる。", + refund_external_explainer_rsk: + "Rootstockウォレットを接続して、このブラウザのスワップ履歴に保存されていない払い戻し可能なスワップをスキャンします。", + refund_external_scanning_rsk: + "Rootstockウォレットにある払い戻し可能なスワップをスキャンしています...", + connected_wallet_no_swaps: + "接続されているRootstockウォレットには返金可能なスワップが含まれていません。", + refund_external_swap: "払い戻し外部スワップ", history_no_swaps: "まだスワップを行っていないようです。", refund_address_header: "返金用の {{ asset }} ウォレットのアドレスを入力", diff --git a/src/pages/RefundExternal.tsx b/src/pages/RefundExternal.tsx index f6169945..f57a1fdc 100644 --- a/src/pages/RefundExternal.tsx +++ b/src/pages/RefundExternal.tsx @@ -103,7 +103,11 @@ const RefundBtcLike = () => {