From 19ebd03e6c25c9648162a0ea8442229a7454701c Mon Sep 17 00:00:00 2001 From: michael1011 Date: Wed, 4 Dec 2024 00:45:36 +0100 Subject: [PATCH] refactor: show transaction.claim.pending as success The claim of the server being enforced does not matter to the client. From their perspective the invoice being paid is enough. This is in preparation for smaller swaps from UTXO based chains that cannot be claimed cooperatively and batch claiming on EVM based chains. --- src/i18n/i18n.ts | 11 ----------- src/pages/Pay.tsx | 12 +++--------- src/status/TransactionClaimPending.tsx | 15 --------------- src/style/index.scss | 1 + 4 files changed, 4 insertions(+), 35 deletions(-) delete mode 100644 src/status/TransactionClaimPending.tsx diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index 25060243..202081b3 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -172,8 +172,6 @@ const dict = { version: "Version", commithash: "Commit Hash", open_in_wallet: "Open in Wallet", - invoice_paid: "Invoice paid", - creating_coop_claim: "Creating cooperative claim transaction.", branding: "Branding", testnet: "Testnet", broadcasting_claim: "Broadcasting claim transaction...", @@ -406,8 +404,6 @@ const dict = { version: "Version", commithash: "Commit Hash", open_in_wallet: "Im Wallet öffnen", - invoice_paid: "Rechnung bezahlt", - creating_coop_claim: "Erstelle kooperative Claim-Transaktion.", branding: "Branding", testnet: "Testnet", broadcasting_claim: "Sende claim transaction...", @@ -642,9 +638,6 @@ const dict = { version: "Versión", commithash: "Commit Hash", open_in_wallet: "Abrir en monedero", - invoice_paid: "Factura pagada", - creating_coop_claim: - "Creación de una transacción de reclamación cooperativa.", branding: "Branding", testnet: "Testnet", broadcasting_claim: "Enviando transacción de reclamación...", @@ -859,8 +852,6 @@ const dict = { version: "版本", commithash: "提交哈希", open_in_wallet: "在钱包中打开", - invoice_paid: "发票已支付", - creating_coop_claim: "创建合作索赔交易。", branding: "品牌", testnet: "测试网", broadcasting_claim: "正在发送索赔交易...", @@ -1086,8 +1077,6 @@ const dict = { version: "バージョン", commithash: "コミットハッシュ", open_in_wallet: "ウォレットで開く", - invoice_paid: "インボイス支払い完了", - creating_coop_claim: "協力的クレームトランザクションの作成中", branding: "ブランディング", testnet: "テストネット", broadcasting_claim: "クレームトランザクションのブロードキャスト中", diff --git a/src/pages/Pay.tsx b/src/pages/Pay.tsx index bc3ade83..b172fc03 100644 --- a/src/pages/Pay.tsx +++ b/src/pages/Pay.tsx @@ -30,7 +30,6 @@ import InvoiceSet from "../status/InvoiceSet"; import SwapCreated from "../status/SwapCreated"; import SwapExpired from "../status/SwapExpired"; import SwapRefunded from "../status/SwapRefunded"; -import TransactionClaimPending from "../status/TransactionClaimPending"; import TransactionClaimed from "../status/TransactionClaimed"; import TransactionConfirmed from "../status/TransactionConfirmed"; import TransactionLockupFailed from "../status/TransactionLockupFailed"; @@ -111,7 +110,9 @@ const Pay = () => { swapStatus() === swapStatusSuccess.TransactionClaimed || swapStatus() === - swapStatusSuccess.InvoiceSettled + swapStatusSuccess.InvoiceSettled || + swapStatus() === + swapStatusPending.TransactionClaimPending }> @@ -177,13 +178,6 @@ const Pay = () => { }> - - - { - const { t } = useGlobalContext(); - return ( -
-

{t("invoice_paid")}

-

{t("creating_coop_claim")}

- -
- ); -}; - -export default TransactionClaimPending; diff --git a/src/style/index.scss b/src/style/index.scss index 7215af08..23360141 100644 --- a/src/style/index.scss +++ b/src/style/index.scss @@ -186,6 +186,7 @@ hr.spacer { [data-status="invoice.settled"], [data-status="transaction.confirmed"], [data-status="transaction.claimed"], +[data-status="transaction.claim.pending"], [data-status="quote.available"] { > p > .btn-small { background-color: #246c24;