Skip to content

Commit a951675

Browse files
committed
Show short-address for unregistered validators in StakingInfoPage
Fixes #200.
1 parent cacadce commit a951675

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

src/components/staking/StakingInfoPage.vue

+25-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
<div class="staking-info-page flex-column">
33
<PageHeader :backArrow="false">
44
<template v-if="validator">
5-
{{ $t(
6-
'Staking with {validator}',
7-
{ validator: 'name' in validator ? validator.name : validator.address.substr(0, 9) },
8-
) }}
5+
<i18n path="Staking with {validator}" :tag="false">
6+
<template v-if="'name' in validator" slot="validator">
7+
{{ validator.name }}
8+
</template>
9+
<template v-else slot="validator">
10+
<ShortAddress :address="validator.address" />
11+
</template>
12+
</i18n>
913
</template>
1014
<template v-else>
1115
{{ $t('Staking') }}
@@ -433,6 +437,23 @@ export default defineComponent({
433437
434438
.page-header {
435439
padding-bottom: 3rem;
440+
441+
::v-deep h1 {
442+
display: flex;
443+
justify-content: center;
444+
gap: 0.25em;
445+
flex-wrap: wrap;
446+
}
447+
448+
.short-address {
449+
display: inline-flex;
450+
451+
::v-deep .address {
452+
line-height: inherit;
453+
font-family: inherit;
454+
font-weight: inherit;
455+
}
456+
}
436457
}
437458
438459
.page-body {

0 commit comments

Comments
 (0)