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