@@ -11,6 +11,7 @@ import { formatTimeRemaining } from "@/ui/common/utils/time";
1111
1212import { BabyActivityCard } from "../ActivityCard" ;
1313import { UnbondingModal } from "../UnbondingModal" ;
14+ import { ValidatorAvatar } from "../ValidatorAvatar" ;
1415
1516const { logo, coinSymbol } = getNetworkConfigBBN ( ) ;
1617
@@ -58,6 +59,16 @@ export function BabyActivityList() {
5859 delegation,
5960 data : {
6061 icon : logo ,
62+ iconAlt : `${ coinSymbol } Logo` ,
63+ chainName : delegation . validator . name || delegation . validator . address ,
64+ chainIcon : (
65+ < ValidatorAvatar
66+ size = "small"
67+ name = { delegation . validator . name || delegation . validator . address }
68+ />
69+ ) ,
70+ chainIconAlt :
71+ delegation . validator . name || delegation . validator . address ,
6172 formattedAmount : `${ formattedAmount } ${ coinSymbol } ` ,
6273 primaryAction :
6374 formattedAmount > 0
@@ -67,12 +78,7 @@ export function BabyActivityList() {
6778 onClick : ( ) => openUnbondingModal ( delegation ) ,
6879 }
6980 : undefined ,
70- details : [ ] ,
71- optionalDetails : [
72- {
73- label : "Validator" ,
74- value : delegation . validator . name || delegation . validator . address ,
75- } ,
81+ details : [
7682 {
7783 label : "Commission" ,
7884 value : formatCommissionPercentage (
@@ -82,16 +88,30 @@ export function BabyActivityList() {
8288 ...( isUnbonding
8389 ? [
8490 {
85- label : "Unbonding " ,
91+ label : "Pending " ,
8692 value : delegation . unbondingInfo
87- ? delegation . unbondingInfo . isOptimistic
88- ? `${ babylon . utils . ubbnToBaby ( delegation . unbondingInfo . amount ) } ${ coinSymbol } - Processing`
89- : `${ babylon . utils . ubbnToBaby ( delegation . unbondingInfo . amount ) } ${ coinSymbol } in ${ formatTimeRemaining ( delegation . unbondingInfo . completionTime ) } ${ delegation . unbondingInfo . statusSuffix || "" } `
93+ ? `${ babylon . utils . ubbnToBaby ( delegation . unbondingInfo . amount ) } ${ coinSymbol } `
9094 : "In progress..." ,
95+ collapsible : Boolean ( delegation . unbondingInfo ) ,
96+ nestedDetails : delegation . unbondingInfo
97+ ? [
98+ {
99+ label : "Amount" ,
100+ value : `${ babylon . utils . ubbnToBaby ( delegation . unbondingInfo . amount ) } ${ coinSymbol } ` ,
101+ } ,
102+ {
103+ label : "Time Remaining" ,
104+ value : delegation . unbondingInfo . isOptimistic
105+ ? "Processing"
106+ : `${ formatTimeRemaining ( delegation . unbondingInfo . completionTime ) } ${ delegation . unbondingInfo . statusSuffix || "" } ` ,
107+ } ,
108+ ]
109+ : [ ] ,
91110 } ,
92111 ]
93112 : [ ] ) ,
94113 ] ,
114+ optionalDetails : [ ] ,
95115 } ,
96116 } ;
97117 } ) ;
0 commit comments