Skip to content

Commit

Permalink
refactor: show transaction.claim.pending as success (#763)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
michael1011 authored Dec 4, 2024
1 parent 89d3f6a commit 80685e8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 35 deletions.
11 changes: 0 additions & 11 deletions src/i18n/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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...",
Expand Down Expand Up @@ -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...",
Expand Down Expand Up @@ -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...",
Expand Down Expand Up @@ -859,8 +852,6 @@ const dict = {
version: "版本",
commithash: "提交哈希",
open_in_wallet: "在钱包中打开",
invoice_paid: "发票已支付",
creating_coop_claim: "创建合作索赔交易。",
branding: "品牌",
testnet: "测试网",
broadcasting_claim: "正在发送索赔交易...",
Expand Down Expand Up @@ -1086,8 +1077,6 @@ const dict = {
version: "バージョン",
commithash: "コミットハッシュ",
open_in_wallet: "ウォレットで開く",
invoice_paid: "インボイス支払い完了",
creating_coop_claim: "協力的クレームトランザクションの作成中",
branding: "ブランディング",
testnet: "テストネット",
broadcasting_claim: "クレームトランザクションのブロードキャスト中",
Expand Down
12 changes: 3 additions & 9 deletions src/pages/Pay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -111,7 +110,9 @@ const Pay = () => {
swapStatus() ===
swapStatusSuccess.TransactionClaimed ||
swapStatus() ===
swapStatusSuccess.InvoiceSettled
swapStatusSuccess.InvoiceSettled ||
swapStatus() ===
swapStatusPending.TransactionClaimPending
}>
<TransactionClaimed />
</Match>
Expand Down Expand Up @@ -177,13 +178,6 @@ const Pay = () => {
}>
<InvoicePending />
</Match>
<Match
when={
swapStatus() ===
swapStatusPending.TransactionClaimPending
}>
<TransactionClaimPending />
</Match>
<Match
when={
swapStatus() === swapStatusPending.SwapCreated
Expand Down
15 changes: 0 additions & 15 deletions src/status/TransactionClaimPending.tsx

This file was deleted.

1 change: 1 addition & 0 deletions src/style/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 80685e8

Please sign in to comment.