proposeByDelegate support

This commit is contained in:
gozzy 2023-03-23 03:03:21 +00:00
parent 2b61afbafe
commit 4ecde79c86
2 changed files with 18 additions and 7 deletions

View file

@ -59,8 +59,13 @@ export default {
}
},
computed: {
...mapState('governance/gov', ['lockedBalance', 'proposals']),
...mapGetters('governance/gov', ['isFetchingProposals', 'constants', 'isFetchingBalances']),
...mapState('governance/gov', ['proposals']),
...mapGetters('governance/gov', [
'isFetchingProposals',
'constants',
'isFetchingBalances',
'votingPower'
]),
...mapGetters('token', ['toDecimals']),
filteredProposals() {
return this.proposals
@ -74,7 +79,7 @@ export default {
},
hasProposalThreshold() {
const PROPOSAL_THRESHOLD = toBN(this.constants.PROPOSAL_THRESHOLD)
return toBN(this.lockedBalance).gte(PROPOSAL_THRESHOLD)
return toBN(this.votingPower).gte(PROPOSAL_THRESHOLD)
},
proposalThreshold() {
return this.toDecimals(this.constants.PROPOSAL_THRESHOLD, 18)