forked from cerc-io/cosmos-explorer
fix gov proposal loading issue
This commit is contained in:
parent
f48c9b8a79
commit
ef747b2e22
@ -72,7 +72,6 @@ export const useIndexModule = defineStore('module-index', {
|
||||
total_volumes: [] as number[],
|
||||
},
|
||||
communityPool: [] as { amount: string; denom: string }[],
|
||||
proposals: {} as PaginatedProposals,
|
||||
tally: {} as Record<string, Tally>,
|
||||
};
|
||||
},
|
||||
@ -130,6 +129,11 @@ export const useIndexModule = defineStore('module-index', {
|
||||
return staking.pool;
|
||||
},
|
||||
|
||||
proposals() {
|
||||
const gov = useGovStore()
|
||||
return gov.proposals['2']
|
||||
},
|
||||
|
||||
stats() {
|
||||
const base = useBaseStore();
|
||||
const bank = useBankStore();
|
||||
@ -205,10 +209,10 @@ export const useIndexModule = defineStore('module-index', {
|
||||
denom: t.denom,
|
||||
}));
|
||||
});
|
||||
const gov = useGovStore();
|
||||
gov.fetchProposals('2').then((x) => {
|
||||
this.proposals = x;
|
||||
});
|
||||
// const gov = useGovStore();
|
||||
// gov.fetchProposals('2').then((x) => {
|
||||
// this.proposals = x;
|
||||
// });
|
||||
},
|
||||
tickerColor(color: string) {
|
||||
return colorMap(color);
|
||||
|
@ -23,7 +23,9 @@ export const useGovStore = defineStore('govStore', {
|
||||
},
|
||||
actions: {
|
||||
initial() {
|
||||
this.$reset()
|
||||
this.fetchParams();
|
||||
this.fetchProposals("2");
|
||||
},
|
||||
async fetchProposals(status: string, pagination?: PageRequest) {
|
||||
if (!this.loading[status]) {
|
||||
|
Loading…
Reference in New Issue
Block a user