Skip to content

Commit

Permalink
chore: hide preimage in failed payment dialog (#705)
Browse files Browse the repository at this point in the history
* chore: hide preimage in failed payment dialog

* chore: hide fee in failed payments
  • Loading branch information
im-adithya authored Sep 25, 2024
1 parent 4f263ee commit fff8c2c
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions frontend/src/components/TransactionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function TransactionItem({ tx }: Props) {
.format("D MMMM YYYY, HH:mm")}
</p>
</div>
{type == "outgoing" && (
{tx.state != "failed" && type == "outgoing" && (
<div className="mt-6">
<p>Fee</p>
<p className="text-muted-foreground">
Expand Down Expand Up @@ -233,22 +233,24 @@ function TransactionItem({ tx }: Props) {
{showDetails && (
<>
{tx.boostagram && <PodcastingInfo boost={tx.boostagram} />}
<div className="mt-6">
<p>Preimage</p>
<div className="flex items-center gap-4">
<p className="text-muted-foreground break-all">
{tx.preimage}
</p>
<CopyIcon
className="cursor-pointer text-muted-foreground w-6 h-6"
onClick={() => {
if (tx.preimage) {
copy(tx.preimage);
}
}}
/>
{tx.preimage && (
<div className="mt-6">
<p>Preimage</p>
<div className="flex items-center gap-4">
<p className="text-muted-foreground break-all">
{tx.preimage}
</p>
<CopyIcon
className="cursor-pointer text-muted-foreground w-6 h-6"
onClick={() => {
if (tx.preimage) {
copy(tx.preimage);
}
}}
/>
</div>
</div>
</div>
)}
<div className="mt-6">
<p>Hash</p>
<div className="flex items-center gap-4">
Expand Down

0 comments on commit fff8c2c

Please sign in to comment.