Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: hide preimage in failed payment dialog #705

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading