@@ -5,7 +5,10 @@ import { AssetImage } from "App/Transfer/AssetImage";
5
5
import { isShieldedAddress , isTransparentAddress } from "App/Transfer/common" ;
6
6
import clsx from "clsx" ;
7
7
import { FaLock } from "react-icons/fa" ;
8
- import { IoCheckmarkCircleOutline } from "react-icons/io5" ;
8
+ import {
9
+ IoCheckmarkCircleOutline ,
10
+ IoCloseCircleOutline ,
11
+ } from "react-icons/io5" ;
9
12
import { twMerge } from "tailwind-merge" ;
10
13
import { TransferTransactionData } from "types" ;
11
14
import keplrSvg from "../../integrations/assets/keplr.svg" ;
@@ -31,6 +34,7 @@ export const LocalStorageTransactionCard = ({
31
34
} ;
32
35
const sender = transaction . sourceAddress ;
33
36
const receiver = transaction . destinationAddress ;
37
+ const transactionFailed = transaction . status === "error" ;
34
38
return (
35
39
< article
36
40
className = { clsx (
@@ -40,13 +44,32 @@ export const LocalStorageTransactionCard = ({
40
44
) }
41
45
>
42
46
< 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
+ ) }
45
61
</ i >
46
62
47
63
< 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 ) } { " " }
50
73
< CopyToClipboardControl
51
74
className = "ml-1.5 text-neutral-400"
52
75
value = { transaction ?. hash ?? "" }
0 commit comments