@@ -3,7 +3,7 @@ import { useInfiniteQuery } from '@tanstack/react-query';
33import {
44 ArrowDownIcon ,
55 ArrowUpIcon ,
6- ExternalLinkIcon ,
6+ DollarSignIcon ,
77 FolderOpenIcon ,
88 RefreshCw ,
99} from 'lucide-react' ;
@@ -253,7 +253,6 @@ export default function ActivitiesFeed() {
253253 </ div >
254254 ) ;
255255}
256-
257256function TxItem ( {
258257 activityType,
259258 timestamp,
@@ -272,6 +271,10 @@ function TxItem({
272271 } ) {
273272 const isOutgoing = fromAddress . toString ( ) === currentAddress . toString ( ) ;
274273
274+ // This case can only happen on testnet, courtesy of minting.
275+ const isSelfDeposit =
276+ activityType === 'deposit' && fromAddress . toString ( ) === currentAddress . toString ( ) ;
277+
275278 let title = '' ;
276279 let icon ;
277280 let amountDisplay = '' ;
@@ -283,10 +286,15 @@ function TxItem({
283286 ) : (
284287 < ArrowDownIcon size = { 18 } className = { cn ( 'text-textPrimary' ) } />
285288 ) ;
289+ // TODO: Show the real amount.
286290 amountDisplay = 'Confidential' ;
287291 } else if ( activityType === 'deposit' ) {
288- title = 'Deposit' ;
289- icon = < ArrowDownIcon size = { 18 } className = { cn ( 'text-textPrimary' ) } /> ;
292+ title = isSelfDeposit ? 'Mint' : 'Deposit' ;
293+ icon = isSelfDeposit ? (
294+ < DollarSignIcon size = { 18 } className = { cn ( 'text-textPrimary' ) } />
295+ ) : (
296+ < ArrowDownIcon size = { 18 } className = { cn ( 'text-textPrimary' ) } />
297+ ) ;
290298 // Cast rest to DepositActivity to access amount
291299 const { amount } = rest as unknown as DepositActivity ;
292300 amountDisplay = formatAmount ( amount , tokenSymbol , tokenDecimals ) ;
@@ -316,39 +324,40 @@ function TxItem({
316324
317325 { /* To/From information */ }
318326 < div className = 'flex items-center gap-1' >
319- < span className = 'typography-caption2 text-textSecondary' >
327+ < span className = 'typography-caption1 text-textSecondary' >
320328 { activityType === 'transfer' && ( isOutgoing ? 'To: ' : 'From: ' ) }
321329 { activityType === 'deposit' && 'From: ' }
322330 { activityType === 'withdraw' && 'To: ' }
323331 </ span >
324- < AddressDisplay
325- address = {
326- activityType === 'transfer'
327- ? isOutgoing
328- ? toAddress
329- : fromAddress
330- : activityType === 'deposit'
331- ? fromAddress
332- : toAddress
333- }
334- />
335-
336- < div className = 'ml-2 flex items-center gap-1' >
337- < UiIcon name = 'CalendarIcon' size = { 12 } className = 'text-textSecondary' />
338- { timestamp && (
339- < span className = 'typography-caption2 text-textSecondary' >
340- { timestamp . toLocaleString ( ) }
341- </ span >
342- ) }
343- </ div >
332+ < >
333+ < AddressDisplay
334+ address = {
335+ activityType === 'transfer'
336+ ? isOutgoing
337+ ? toAddress
338+ : fromAddress
339+ : activityType === 'deposit'
340+ ? fromAddress
341+ : toAddress
342+ }
343+ />
344+ < div className = 'ml-2' />
345+ </ >
344346
345347 < Link
346348 href = { getTxExplorerUrl ( txnVersion . toString ( ) ) }
347349 target = '_blank'
348350 className = 'ml-auto'
349351 aria-label = 'View transaction details'
350352 >
351- < ExternalLinkIcon size = { 14 } className = 'text-textSecondary' />
353+ < div className = 'flex items-center gap-1' >
354+ < UiIcon name = 'CalendarIcon' size = { 12 } className = 'text-textSecondary' />
355+ { timestamp && (
356+ < span className = 'typography-caption2 text-textSecondary' >
357+ { timestamp . toLocaleString ( ) }
358+ </ span >
359+ ) }
360+ </ div >
352361 </ Link >
353362 </ div >
354363 </ div >
@@ -407,7 +416,7 @@ const AddressDisplay = ({ address }: { address: AccountAddress }) => {
407416 // Extract the part before the first dot if it's a valid name
408417 const formattedName = name . split ( '.' ) [ 0 ] ;
409418 return (
410- < span className = 'typography-caption1 text-textPrimary' > { formattedName } </ span >
419+ < span className = 'typography-caption1 text-textPrimary' > @ { formattedName } </ span >
411420 ) ;
412421 }
413422
0 commit comments