@@ -28,6 +28,7 @@ import config from 'configs/app';
28
28
import { WEI , WEI_IN_GWEI } from 'lib/consts' ;
29
29
import { useArweaveId } from 'lib/hooks/useArweaveId' ;
30
30
import { useBlobScan } from 'lib/hooks/useBlobScan' ;
31
+ import { useTxTags } from 'lib/hooks/useTxTags' ;
31
32
import { useWvmArchiver } from 'lib/hooks/useWvmArchiver' ;
32
33
import getNetworkValidatorTitle from 'lib/networks/getNetworkValidatorTitle' ;
33
34
import getConfirmationDuration from 'lib/tx/getConfirmationDuration' ;
@@ -50,6 +51,7 @@ import RawInputData from 'ui/shared/RawInputData';
50
51
import BlobScanTag from 'ui/shared/statusTag/BlobScanTag' ;
51
52
import TxStatus from 'ui/shared/statusTag/TxStatus' ;
52
53
import WvmArchiverTag from 'ui/shared/statusTag/WvmArchiverTag' ;
54
+ import WvmTxTag from 'ui/shared/statusTag/WvmTxTag' ;
53
55
import TextSeparator from 'ui/shared/TextSeparator' ;
54
56
import TxFeeStability from 'ui/shared/tx/TxFeeStability' ;
55
57
import Utilization from 'ui/shared/Utilization/Utilization' ;
@@ -88,6 +90,13 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
88
90
block : data ?. block ,
89
91
} ) ;
90
92
93
+ const { data : txTags , isLoading : isTxTagsLoading } = useTxTags ( {
94
+ txHash : data ?. hash ,
95
+ } ) ;
96
+
97
+ // eslint-disable-next-line no-console
98
+ console . log ( 'txTags' , txTags ) ;
99
+
91
100
const truncateArweaveId = ( address : string ) => {
92
101
const start = address . slice ( 0 , 28 ) ;
93
102
const end = address . slice ( - 4 ) ;
@@ -509,7 +518,28 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
509
518
< Skeleton > loading...</ Skeleton >
510
519
) }
511
520
512
- < DetailsInfoItemDivider />
521
+ { txTags ? (
522
+ < >
523
+ < DetailsInfoItemDivider />
524
+ < DetailsInfoItem . Label
525
+ hint = "The transaction tags associated with the transaction"
526
+ isLoading = { isTxTagsLoading }
527
+ >
528
+ Tags
529
+ </ DetailsInfoItem . Label >
530
+ < Box display = "flex" flexDir = "column" gap = { 2 } >
531
+ { txTags . map ( ( tag : [ string , string ] ) => (
532
+ < Box key = { tag [ 0 ] } display = "flex" >
533
+ < Box minWidth = "120px" flexShrink = { 0 } >
534
+ < WvmTxTag tag = { tag [ 0 ] } />
535
+ </ Box >
536
+ < Text flexGrow = { 1 } wordBreak = "break-word" > { tag [ 1 ] } </ Text >
537
+ </ Box >
538
+ ) ) }
539
+ </ Box >
540
+ < DetailsInfoItemDivider />
541
+ </ >
542
+ ) : null }
513
543
514
544
< TxDetailsActions
515
545
hash = { data . hash }
0 commit comments