Skip to content

Commit 87d518e

Browse files
committed
fix: display timed out ibc deposits as failed txs
1 parent 30e944a commit 87d518e

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

apps/namadillo/src/App/Transactions/LocalStorageTransactionCard.tsx

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { AssetImage } from "App/Transfer/AssetImage";
55
import { isShieldedAddress, isTransparentAddress } from "App/Transfer/common";
66
import clsx from "clsx";
77
import { FaLock } from "react-icons/fa";
8-
import { IoCheckmarkCircleOutline } from "react-icons/io5";
8+
import {
9+
IoCheckmarkCircleOutline,
10+
IoCloseCircleOutline,
11+
} from "react-icons/io5";
912
import { twMerge } from "tailwind-merge";
1013
import { TransferTransactionData } from "types";
1114
import keplrSvg from "../../integrations/assets/keplr.svg";
@@ -31,6 +34,7 @@ export const LocalStorageTransactionCard = ({
3134
};
3235
const sender = transaction.sourceAddress;
3336
const receiver = transaction.destinationAddress;
37+
const transactionFailed = transaction.status === "error";
3438
return (
3539
<article
3640
className={clsx(
@@ -40,13 +44,32 @@ export const LocalStorageTransactionCard = ({
4044
)}
4145
>
4246
<div className="flex items-center gap-3">
43-
<i className={twMerge("text-2xl, text-success")}>
44-
<IoCheckmarkCircleOutline className="ml-1 mt-0.5 w-10 h-10" />
47+
<i
48+
className={twMerge(
49+
clsx("text-2xl", {
50+
"text-success": !transactionFailed,
51+
"text-fail": transactionFailed,
52+
})
53+
)}
54+
>
55+
{!transactionFailed && (
56+
<IoCheckmarkCircleOutline className="ml-1 mt-0.5 w-10 h-10" />
57+
)}
58+
{transactionFailed && (
59+
<IoCloseCircleOutline className="ml-1 mt-0.5 w-10 h-10" />
60+
)}
4561
</i>
4662

4763
<div className="flex flex-col">
48-
<h3 className="text-success flex relative group/tooltip">
49-
{getTitle(transaction)}{" "}
64+
<h3
65+
className={twMerge(
66+
clsx("flex relative group/tooltip", {
67+
"text-success": !transactionFailed,
68+
"text-fail": transactionFailed,
69+
})
70+
)}
71+
>
72+
{transactionFailed && "Failed"} {getTitle(transaction)}{" "}
5073
<CopyToClipboardControl
5174
className="ml-1.5 text-neutral-400"
5275
value={transaction?.hash ?? ""}

0 commit comments

Comments
 (0)