From 6daf0d808558fa12a500dc3118c80ea873ccc1bb Mon Sep 17 00:00:00 2001 From: "Alisa | Side.one" Date: Wed, 17 May 2023 23:14:43 +0800 Subject: [PATCH] feat: remove await --- src/stores/useGovStore.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stores/useGovStore.ts b/src/stores/useGovStore.ts index eac5d5ee..33fd62f9 100644 --- a/src/stores/useGovStore.ts +++ b/src/stores/useGovStore.ts @@ -38,13 +38,13 @@ export const useGovStore = defineStore('govStore', { await this.blockchain.rpc?.getGovProposals(status) ); if (status === '2') { - proposals?.proposals?.forEach(async (item) => { - await this.fetchTally(item.proposal_id).then((res) => { + proposals?.proposals?.forEach((item) => { + this.fetchTally(item.proposal_id).then((res) => { item.final_tally_result = res?.tally; }); if (this.walletstore.currentAddress) { 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' }); } catch (error) {