filter spam

This commit is contained in:
liangping 2023-11-15 14:46:37 +08:00
parent cb756ea204
commit ca59e3d586

View File

@ -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) => {