Skip to content

Commit

Permalink
fix: fix moniker on staking page
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan-LukeKlopper committed Apr 10, 2024
1 parent 95c0e88 commit 9d66574
Showing 1 changed file with 41 additions and 26 deletions.
67 changes: 41 additions & 26 deletions src/modules/[chain]/staking/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -386,42 +386,57 @@ loadAvatars();
}"
class="font-weight-medium"
>
{{ v.description?.moniker }}
<template v-if="chainStore.chainName === 'namada'">
{{ v.description?.identity || v.description?.website || v.description?.moniker }}
</template>
<template v-else>
{{ v.description?.moniker }}
</template>
</RouterLink>
</span>
<span class="text-xs">{{
v.description?.website ||
v.description?.identity ||
'-'
}}</span>
<span class="text-xs">
{{
v.description?.website ||
v.description?.identity ||
'-'
}}
</span>
</div>
</div>
</td>

<!-- 👉 Voting Power -->
<td class="text-right">
<div class="flex flex-col">
<h6 class="text-sm font-weight-medium whitespace-nowrap ">
{{
format.formatToken(
{
amount: parseInt(
v.tokens
).toString(),
denom: staking.params
.bond_denom,
},
true,
'0,0'
)
}}
</h6>
<template v-if="chainStore.chainName === 'namada'">
<!-- Content to render when specialVariable equals specialValue -->
<h6 class="text-sm font-weight-medium whitespace-nowrap ">
{{ parseInt(v.tokens).toLocaleString() }} NAM
</h6>
</template>
<template v-else>
<h6 class="text-sm font-weight-medium whitespace-nowrap ">
{{
format.formatToken(
{
amount: parseInt(
v.tokens
).toString(),
denom: staking.params
.bond_denom,
},
true,
'0,0'
)
}}
</h6>
</template>
<span class="text-xs">{{
format.calculatePercent(
v.delegator_shares,
staking.totalPower
)
}}</span>
format.calculatePercent(
v.delegator_shares,
staking.totalPower
)
}}</span>
</div>
</td>
<!-- 👉 24h Changes -->
Expand Down

0 comments on commit 9d66574

Please sign in to comment.