From fff8c2ca11b458a6196096c6c5d9be70e8c96602 Mon Sep 17 00:00:00 2001
From: Adithya Vardhan
Date: Wed, 25 Sep 2024 16:04:34 +0530
Subject: [PATCH] chore: hide preimage in failed payment dialog (#705)
* chore: hide preimage in failed payment dialog
* chore: hide fee in failed payments
---
frontend/src/components/TransactionItem.tsx | 34 +++++++++++----------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/frontend/src/components/TransactionItem.tsx b/frontend/src/components/TransactionItem.tsx
index 3669e4ec..33f5fb3b 100644
--- a/frontend/src/components/TransactionItem.tsx
+++ b/frontend/src/components/TransactionItem.tsx
@@ -199,7 +199,7 @@ function TransactionItem({ tx }: Props) {
.format("D MMMM YYYY, HH:mm")}
- {type == "outgoing" && (
+ {tx.state != "failed" && type == "outgoing" && (
Fee
@@ -233,22 +233,24 @@ function TransactionItem({ tx }: Props) {
{showDetails && (
<>
{tx.boostagram && }
-
-
Preimage
-
-
- {tx.preimage}
-
-
{
- if (tx.preimage) {
- copy(tx.preimage);
- }
- }}
- />
+ {tx.preimage && (
+
+
Preimage
+
+
+ {tx.preimage}
+
+
{
+ if (tx.preimage) {
+ copy(tx.preimage);
+ }
+ }}
+ />
+
-
+ )}