Merge pull request #277 from AndreMiras/feature/validator_link

Clickable validator link from the account page
This commit is contained in:
ping 2022-11-26 09:32:44 +08:00 committed by GitHub
commit 3bc7696bf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,6 +197,15 @@
:items="deleTable"
stacked="sm"
>
<template #cell(validator)="data">
<span>
<router-link
:to="`../staking/${data.value.address}`"
>
{{ data.value.moniker }}
</router-link>
</span>
</template>
<template #cell(action)="data">
<!-- size -->
<b-button-group
@ -627,7 +636,10 @@ export default {
this.delegations.forEach(e => {
const reward = this.reward.rewards.find(r => r.validator_address === e.delegation.validator_address)
re.push({
validator: getStakingValidatorOperator(this.$http.config.chain_name, e.delegation.validator_address, 8),
validator: {
moniker: getStakingValidatorOperator(this.$http.config.chain_name, e.delegation.validator_address, 8),
address: e.delegation.validator_address,
},
token: formatToken(e.balance, {}, decimal),
reward: tokenFormatter(reward.reward, this.denoms),
action: e.delegation.validator_address,