feat: error toast
This commit is contained in:
parent
be7394665b
commit
8d8a1503ed
@ -31,11 +31,7 @@ let positions = ref([]);
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
stakingStore.init();
|
stakingStore.init();
|
||||||
rpc.value = rpcList.value[0].address + '/consensus_state';
|
rpc.value = rpcList.value[0].address + '/consensus_state';
|
||||||
// 'https://rpc-osmosis-ia.cosmosia.notional.ventures:443/consensus_state';
|
|
||||||
// 'https://rpc-osmosis-ia.cosmosia.notional.ventures/consensus_state';
|
|
||||||
// rpcList.value[0].address + '/consensus_state';
|
|
||||||
fetchPosition();
|
fetchPosition();
|
||||||
console.log(stakingStore.rpc, 'stakingStore', validators);
|
|
||||||
update();
|
update();
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
update();
|
update();
|
||||||
@ -104,9 +100,8 @@ async function fetchPosition() {
|
|||||||
positions.value = data.result.round_state.validators.validators;
|
positions.value = data.result.round_state.validators.validators;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
httpstatus.value = error?.status || 500;
|
httpstatus.value = error?.status || 500;
|
||||||
httpStatusText.value = 'Error';
|
httpStatusText.value = error?.message||'Error';
|
||||||
}
|
}
|
||||||
console.log(dumpurl, 'dumpurl');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function update() {
|
async function update() {
|
||||||
|
@ -88,7 +88,6 @@ export const useStakingStore = defineStore('stakingStore', {
|
|||||||
(a, b) => Number(b.delegator_shares) - Number(a.delegator_shares)
|
(a, b) => Number(b.delegator_shares) - Number(a.delegator_shares)
|
||||||
)
|
)
|
||||||
if (status === 'BOND_STATUS_BONDED') {
|
if (status === 'BOND_STATUS_BONDED') {
|
||||||
console.log(proVals, 'proVals')
|
|
||||||
this.validators = proVals;
|
this.validators = proVals;
|
||||||
}
|
}
|
||||||
return proVals
|
return proVals
|
||||||
|
Loading…
Reference in New Issue
Block a user