diff --git a/src/libs/data/proposal-tally.js b/src/libs/data/proposal-tally.js index a7cb76aa..0bbb0b44 100644 --- a/src/libs/data/proposal-tally.js +++ b/src/libs/data/proposal-tally.js @@ -1,5 +1,3 @@ -import { percent } from '../utils' - export default class ProposalTally { constructor() { this.total = 0 @@ -17,11 +15,11 @@ export default class ProposalTally { } else { this.total = total } - this.yes = percent(Number(element.yes) / this.total) - this.no = percent(Number(element.no) / this.total) - this.veto = percent(Number(element.no_with_veto) / this.total) - this.abstain = percent(Number(element.abstain) / this.total) - this.turnout = percent(subtotal / this.total) + this.yes = Number(element.yes) / this.total + this.no = Number(element.no) / this.total + this.veto = Number(element.no_with_veto) / this.total + this.abstain = Number(element.abstain) / this.total + this.turnout = subtotal / this.total return this } diff --git a/src/libs/data/proposal.js b/src/libs/data/proposal.js index a1747eb3..938ebe81 100644 --- a/src/libs/data/proposal.js +++ b/src/libs/data/proposal.js @@ -1,5 +1,4 @@ import compareVersions from 'compare-versions' -import { toDay, formatToken } from '../utils' import ProposalTally from './proposal-tally' export default class Proposal { @@ -28,10 +27,11 @@ export default class Proposal { this.title = element.content.value.title this.description = element.content.value.description this.tally = new ProposalTally().init(element.final_tally_result, total) - this.submit_time = toDay(element.submit_time, 'date') - this.voting_end_time = toDay(element.voting_end_time, 'date') - this.voting_start_time = toDay(element.voting_start_time, 'date') - this.total_deposit = formatToken(element.total_deposit[0]) + this.submit_time = element.submit_time + this.voting_end_time = element.voting_end_time + this.voting_start_time = element.voting_start_time + // eslint-disable-next-line prefer-destructuring + this.total_deposit = element.total_deposit[0] this.contents = element.content.value return this } diff --git a/src/libs/data/staking-pool.js b/src/libs/data/staking-pool.js index 8972b84f..6008dcb2 100644 --- a/src/libs/data/staking-pool.js +++ b/src/libs/data/staking-pool.js @@ -1,5 +1,3 @@ -import { percent } from '../utils' - export default class StakingPool { constructor() { this.element = null @@ -19,6 +17,6 @@ export default class StakingPool { } bondedRatio() { - return percent((this.bondedToken * 100) / this.total()) + return (this.bondedToken * 100) / this.total() } } diff --git a/src/views/Governance.vue b/src/views/Governance.vue index 81d0d202..1a0d12e7 100644 --- a/src/views/Governance.vue +++ b/src/views/Governance.vue @@ -56,7 +56,7 @@ Start Date