forked from cerc-io/cosmos-explorer
remove abstain
This commit is contained in:
parent
3aa899bf90
commit
f75a89ac2d
@ -179,7 +179,7 @@
|
||||
v-b-tooltip.hover
|
||||
title="Threshold"
|
||||
class="box overlay"
|
||||
:style="`left:${scaleWidth(prop.tally)}%;`"
|
||||
:style="`left:${scaleWidth(prop)}%;`"
|
||||
/>
|
||||
<div
|
||||
v-if="tallyParam"
|
||||
@ -655,9 +655,9 @@ export default {
|
||||
}
|
||||
return 'be rejected'
|
||||
},
|
||||
scaleWidth() {
|
||||
scaleWidth(p) {
|
||||
if (this.tallyParam) {
|
||||
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * 100
|
||||
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100
|
||||
}
|
||||
return 50
|
||||
},
|
||||
|
@ -173,6 +173,7 @@
|
||||
|
||||
<div
|
||||
v-if="tallyParam"
|
||||
title="Threshold"
|
||||
class="box overlay"
|
||||
:style="`left:${scaleWidth(proposal)}%;`"
|
||||
/>
|
||||
@ -410,9 +411,10 @@ export default {
|
||||
scaleWidth(p) {
|
||||
if (this.tallyParam) {
|
||||
if (p.status === 2) {
|
||||
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * 100
|
||||
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100
|
||||
}
|
||||
return Number(this.tallyParam.threshold) * 100
|
||||
console.log(p.tally, Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100)
|
||||
return Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100
|
||||
}
|
||||
return 50
|
||||
},
|
||||
|
@ -219,9 +219,9 @@ export default {
|
||||
scaleWidth(p) {
|
||||
if (this.tallyParam) {
|
||||
if (p.status === 2) {
|
||||
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * 100
|
||||
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100
|
||||
}
|
||||
return Number(this.tallyParam.threshold) * 100
|
||||
return Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100
|
||||
}
|
||||
return 50
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user