From ca59e3d58615598fa9d7d744de0eec1a03a8a7c6 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Wed, 15 Nov 2023 14:46:37 +0800 Subject: [PATCH] filter spam --- src/stores/useGovStore.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/stores/useGovStore.ts b/src/stores/useGovStore.ts index 48b07fce..507154e0 100644 --- a/src/stores/useGovStore.ts +++ b/src/stores/useGovStore.ts @@ -37,6 +37,12 @@ export const useGovStore = defineStore('govStore', { const proposals = reactive( await this.blockchain.rpc?.getGovProposals(status, pagination) ); + + //filter spam proposals + if(proposals?.proposals) { + proposals.proposals = proposals.proposals.filter((item) => item.content.title && item.content.title.toLowerCase().indexOf("airdrop")===-1); + } + if (status === '2') { proposals?.proposals?.forEach((item) => { this.fetchTally(item.proposal_id).then((res) => {