feat: error toast

This commit is contained in:
Alisa | Side.one 2023-06-06 16:18:03 +08:00
parent be7394665b
commit 8d8a1503ed
2 changed files with 1 additions and 7 deletions

View File

@ -31,11 +31,7 @@ let positions = ref([]);
onMounted(() => {
stakingStore.init();
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();
console.log(stakingStore.rpc, 'stakingStore', validators);
update();
timer = setInterval(() => {
update();
@ -104,9 +100,8 @@ async function fetchPosition() {
positions.value = data.result.round_state.validators.validators;
} catch (error) {
httpstatus.value = error?.status || 500;
httpStatusText.value = 'Error';
httpStatusText.value = error?.message||'Error';
}
console.log(dumpurl, 'dumpurl');
}
async function update() {

View File

@ -88,7 +88,6 @@ export const useStakingStore = defineStore('stakingStore', {
(a, b) => Number(b.delegator_shares) - Number(a.delegator_shares)
)
if (status === 'BOND_STATUS_BONDED') {
console.log(proVals, 'proVals')
this.validators = proVals;
}
return proVals