feat: remove await
This commit is contained in:
parent
9f18b65a9d
commit
6daf0d8085
@ -38,13 +38,13 @@ export const useGovStore = defineStore('govStore', {
|
|||||||
await this.blockchain.rpc?.getGovProposals(status)
|
await this.blockchain.rpc?.getGovProposals(status)
|
||||||
);
|
);
|
||||||
if (status === '2') {
|
if (status === '2') {
|
||||||
proposals?.proposals?.forEach(async (item) => {
|
proposals?.proposals?.forEach((item) => {
|
||||||
await this.fetchTally(item.proposal_id).then((res) => {
|
this.fetchTally(item.proposal_id).then((res) => {
|
||||||
item.final_tally_result = res?.tally;
|
item.final_tally_result = res?.tally;
|
||||||
});
|
});
|
||||||
if (this.walletstore.currentAddress) {
|
if (this.walletstore.currentAddress) {
|
||||||
try {
|
try {
|
||||||
await this.fetchProposalVotesVoter(item.proposal_id,this.walletstore.currentAddress).then((res) => {
|
this.fetchProposalVotesVoter(item.proposal_id,this.walletstore.currentAddress).then((res) => {
|
||||||
item.voterStatus = res?.vote?.option || 'No With Veto'
|
item.voterStatus = res?.vote?.option || 'No With Veto'
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user