diff --git a/src/modules/[chain]/indexStore.ts b/src/modules/[chain]/indexStore.ts index 003878e3..964f36d7 100644 --- a/src/modules/[chain]/indexStore.ts +++ b/src/modules/[chain]/indexStore.ts @@ -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, }; }, @@ -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); diff --git a/src/stores/useGovStore.ts b/src/stores/useGovStore.ts index 056fdaf3..0234a1c7 100644 --- a/src/stores/useGovStore.ts +++ b/src/stores/useGovStore.ts @@ -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]) {