add unbonding validators
This commit is contained in:
parent
f4732ec594
commit
75f2c5b40c
@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import PaginationBar from '@/components/PaginationBar.vue';
|
import PaginationBar from '@/components/PaginationBar.vue';
|
||||||
import { useBlockchain, useFormatter, useTxDialog } from '@/stores';
|
import { useBaseStore, useBlockchain, useFormatter, useTxDialog } from '@/stores';
|
||||||
import { PageRequest, type PaginatedBalances, type PaginatedTxs } from '@/types';
|
import { PageRequest, type PaginatedBalances, type PaginatedTxs } from '@/types';
|
||||||
import { Icon } from '@iconify/vue';
|
import { Icon } from '@iconify/vue';
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
@ -8,8 +8,10 @@ import { useWasmStore } from '../WasmStore';
|
|||||||
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
|
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import type { ContractInfo, PaginabledContractStates, PaginabledContracts } from '../types';
|
import type { ContractInfo, PaginabledContractStates, PaginabledContracts } from '../types';
|
||||||
|
import { post } from '@/libs';
|
||||||
|
|
||||||
const chainStore = useBlockchain();
|
const chainStore = useBlockchain();
|
||||||
|
const baseStore = useBaseStore();
|
||||||
const format = useFormatter();
|
const format = useFormatter();
|
||||||
const wasmStore = useWasmStore();
|
const wasmStore = useWasmStore();
|
||||||
|
|
||||||
@ -37,6 +39,9 @@ onMounted(() => {
|
|||||||
chainStore.rpc.getTxs("?order_by=2&events=execute._contract_address='{address}'", { address }, page.value).then(res => {
|
chainStore.rpc.getTxs("?order_by=2&events=execute._contract_address='{address}'", { address }, page.value).then(res => {
|
||||||
txs.value = res
|
txs.value = res
|
||||||
})
|
})
|
||||||
|
post("https://prod.neutron.compiler.welldonestudio.io/verification/neutron", {"contractAddress": address, "chainId": baseStore.latest?.block.header.chain_id}).then(res => {
|
||||||
|
console.log("verification:", res)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
function pageload(pageNum: number) {
|
function pageload(pageNum: number) {
|
||||||
@ -193,6 +198,12 @@ const result = ref('');
|
|||||||
</table>
|
</table>
|
||||||
<PaginationBar :limit="page.limit" :total="txs.pagination?.total" :callback="pageload" />
|
<PaginationBar :limit="page.limit" :total="txs.pagination?.total" :callback="pageload" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow">
|
||||||
|
<h2 class="card-title truncate w-full mt-4">Verification</h2>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" id="modal-contract-funds" class="modal-toggle" />
|
<input type="checkbox" id="modal-contract-funds" class="modal-toggle" />
|
||||||
<label for="modal-contract-funds" class="modal cursor-pointer">
|
<label for="modal-contract-funds" class="modal cursor-pointer">
|
||||||
|
@ -68,6 +68,9 @@ export const useStakingStore = defineStore('stakingStore', {
|
|||||||
async fetchInacitveValdiators() {
|
async fetchInacitveValdiators() {
|
||||||
return this.fetchValidators('BOND_STATUS_UNBONDED');
|
return this.fetchValidators('BOND_STATUS_UNBONDED');
|
||||||
},
|
},
|
||||||
|
async fetchUnbondingValdiators() {
|
||||||
|
return this.fetchValidators('BOND_STATUS_UNBONDING');
|
||||||
|
},
|
||||||
async fetchValidator(validatorAddr: string) {
|
async fetchValidator(validatorAddr: string) {
|
||||||
return this.blockchain.rpc.getStakingValidator(validatorAddr);
|
return this.blockchain.rpc.getStakingValidator(validatorAddr);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user