forked from cerc-io/cosmos-explorer
feat: delegrations rewards
This commit is contained in:
parent
abfb0d8c44
commit
bbd408393a
@ -1,17 +1,17 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import VueCountdown from '@chenfengyuan/vue-countdown';
|
import Countdown from '@chenfengyuan/vue-countdown';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
time: { type: Number },
|
time: { type: Number },
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<vue-countdown
|
<Countdown
|
||||||
v-if="time"
|
v-if="time"
|
||||||
:time="time > 0 ? time : 0"
|
:time="time > 0 ? time : 0"
|
||||||
v-slot="{ days, hours, minutes, seconds }"
|
v-slot="{ days, hours, minutes, seconds }"
|
||||||
>
|
>
|
||||||
Time Remaining:{{ days }} days, {{ hours }} hours, {{ minutes }} minutes,
|
Time Remaining:{{ days }} days, {{ hours }} hours, {{ minutes }} minutes,
|
||||||
{{ seconds }} seconds.
|
{{ seconds }} seconds.
|
||||||
</vue-countdown>
|
</Countdown>
|
||||||
</template>
|
</template>
|
||||||
|
@ -317,10 +317,13 @@ const color = computed(() => {
|
|||||||
<td>{{ format.formatToken(item?.balance) }}</td>
|
<td>{{ format.formatToken(item?.balance) }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{
|
{{
|
||||||
format.formatToken({
|
format.formatToken(
|
||||||
denom: item?.balance?.denom,
|
walletStore?.rewards?.rewards?.find(
|
||||||
amount: item?.delegation?.shares,
|
(el) =>
|
||||||
})
|
el?.validator_address ===
|
||||||
|
item?.delegation?.validator_address
|
||||||
|
)?.reward?.[0]
|
||||||
|
)
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {
|
import {
|
||||||
useBankStore,
|
|
||||||
useBlockchain,
|
useBlockchain,
|
||||||
useFormatter,
|
useFormatter,
|
||||||
useMintStore,
|
useMintStore,
|
||||||
@ -9,7 +8,7 @@ import {
|
|||||||
} from '@/stores';
|
} from '@/stores';
|
||||||
import { onMounted, computed, ref } from 'vue';
|
import { onMounted, computed, ref } from 'vue';
|
||||||
import { Icon } from '@iconify/vue';
|
import { Icon } from '@iconify/vue';
|
||||||
import ValidatorCommissionRate from '@/components/ValidatorCommissionRate.vue';
|
import CommissionRate from '@/components/ValidatorCommissionRate.vue';
|
||||||
import {
|
import {
|
||||||
consensusPubkeyToHexAddress,
|
consensusPubkeyToHexAddress,
|
||||||
operatorAddressToAccount,
|
operatorAddressToAccount,
|
||||||
@ -301,9 +300,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
<div class="mt-3 grid grid-cols-1 md:grid-cols-3 gap-4">
|
<div class="mt-3 grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||||
<div class="h-100">
|
<div class="h-100">
|
||||||
<ValidatorCommissionRate
|
<CommissionRate :commission="v.commission"></CommissionRate>
|
||||||
:commission="v.commission"
|
|
||||||
></ValidatorCommissionRate>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="h-100 bg-base-100 rounded shadow">
|
<div class="h-100 bg-base-100 rounded shadow">
|
||||||
|
@ -3,7 +3,7 @@ import { useBlockchain, useFormatter } from '@/stores';
|
|||||||
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
|
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
|
||||||
import { computed, ref } from '@vue/reactivity';
|
import { computed, ref } from '@vue/reactivity';
|
||||||
import type { Tx, TxResponse } from '@/types';
|
import type { Tx, TxResponse } from '@/types';
|
||||||
import VueJsonPretty from 'vue-json-pretty';
|
import JsonPretty from 'vue-json-pretty';
|
||||||
import 'vue-json-pretty/lib/styles.css';
|
import 'vue-json-pretty/lib/styles.css';
|
||||||
|
|
||||||
const props = defineProps(['hash', 'chain']);
|
const props = defineProps(['hash', 'chain']);
|
||||||
@ -119,7 +119,7 @@ const messages = computed(() => {
|
|||||||
class="bg-base-100 px-4 pt-3 pb-4 rounded shadow"
|
class="bg-base-100 px-4 pt-3 pb-4 rounded shadow"
|
||||||
>
|
>
|
||||||
<h2 class="card-title truncate mb-2">JSON</h2>
|
<h2 class="card-title truncate mb-2">JSON</h2>
|
||||||
<vue-json-pretty :data="tx" :deep="3" />
|
<JsonPretty :data="tx" :deep="3" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user