@@ -94,10 +94,6 @@ const getAddresses = async () => {
9494 isRefetching .value = false
9595}
9696
97- const calculateTotalBalance = (address ) => {
98- return parseInt (address .balance .spendable ) + parseInt (address .balance .delegated ) + parseInt (address .balance .unbonding )
99- }
100-
10197getAddresses ()
10298
10399/** Refetch addresses */
@@ -192,7 +188,7 @@ const handleLast = async () => {
192188 <th ><Text size =" 12" weight =" 600" color =" tertiary" noWrap >Hash</Text ></th >
193189 <th @click =" handleSort('spendable')" :class =" $style.sortable" >
194190 <Flex align =" center" gap =" 6" >
195- <Text size =" 12" weight =" 600" color =" tertiary" noWrap >Balance</Text >
191+ <Text size =" 12" weight =" 600" color =" tertiary" noWrap >Spendable Balance</Text >
196192 <Icon
197193 v-if =" sort.by === 'spendable'"
198194 name =" chevron"
@@ -202,6 +198,18 @@ const handleLast = async () => {
202198 />
203199 </Flex >
204200 </th >
201+ <th @click =" handleSort('delegated')" :class =" $style.sortable" >
202+ <Flex align =" center" gap =" 6" >
203+ <Text size =" 12" weight =" 600" color =" tertiary" noWrap >Delegated Balance</Text >
204+ <Icon
205+ v-if =" sort.by === 'delegated'"
206+ name =" chevron"
207+ size =" 12"
208+ color =" secondary"
209+ :style =" { transform: `rotate(${sort.dir === 'asc' ? '180' : '0'}deg)` }"
210+ />
211+ </Flex >
212+ </th >
205213 <th ><Text size =" 12" weight =" 600" color =" tertiary" noWrap >First Height</Text ></th >
206214 <th ><Text size =" 12" weight =" 600" color =" tertiary" noWrap >Last Height</Text ></th >
207215 </tr >
@@ -227,7 +235,15 @@ const handleLast = async () => {
227235 <td >
228236 <NuxtLink :to =" `/address/${address.hash}`" >
229237 <AmountInCurrency
230- :amount =" { value: calculateTotalBalance(address) }"
238+ :amount =" { value: parseInt(address.balance.spendable) }"
239+ :styles =" { amount: { size: '13' }, currency: { size: '13' } }"
240+ />
241+ </NuxtLink >
242+ </td >
243+ <td >
244+ <NuxtLink :to =" `/address/${address.hash}`" >
245+ <AmountInCurrency
246+ :amount =" { value: parseInt(address.balance.delegated) }"
231247 :styles =" { amount: { size: '13' }, currency: { size: '13' } }"
232248 />
233249 </NuxtLink >
0 commit comments