File tree 1 file changed +12
-1
lines changed
wormhole-connect/src/views/v2/TxHistory/Item
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,15 @@ import config from 'config';
12
12
import AssetBadge from 'components/AssetBadge' ;
13
13
import {
14
14
calculateUSDPrice ,
15
+ getExplorerUrl ,
15
16
getUSDFormat ,
16
17
millisToRelativeTime ,
17
18
trimTxHash ,
18
19
} from 'utils' ;
19
20
20
21
import type { Transaction } from 'config/types' ;
21
22
import { useTokens } from 'contexts/TokensContext' ;
23
+ import ExplorerLink from 'components/ExplorerLink' ;
22
24
23
25
const useStyles = makeStyles ( ) ( ( theme : any ) => ( {
24
26
container : {
@@ -177,6 +179,15 @@ const TxHistoryItem = (props: Props) => {
177
179
return `${ dateTimeFormat . format ( senderDate ) } ` ;
178
180
} , [ senderTimestamp ] ) ;
179
181
182
+ const chainExplorerLink = useMemo ( ( ) => {
183
+ return (
184
+ < ExplorerLink
185
+ url = { getExplorerUrl ( fromChain , txHash , 'tx' ) }
186
+ text = { trimTxHash ( txHash , 4 , 4 ) }
187
+ />
188
+ ) ;
189
+ } , [ fromChain , txHash ] ) ;
190
+
180
191
return (
181
192
< div className = { classes . container } >
182
193
< Card className = { classes . card } >
@@ -194,7 +205,7 @@ const TxHistoryItem = (props: Props) => {
194
205
color = { theme . palette . text . secondary }
195
206
display = "flex"
196
207
>
197
- < span > { ` Transaction #${ trimTxHash ( txHash , 4 , 4 ) } ` } </ span >
208
+ < span > Transaction #{ chainExplorerLink } </ span >
198
209
< span > { transactionDateTime } </ span >
199
210
</ Typography >
200
211
}
You can’t perform that action at this time.
0 commit comments