diff --git a/src/libs/data/proposal.js b/src/libs/data/proposal.js index b921e3c0..6b6c1242 100644 --- a/src/libs/data/proposal.js +++ b/src/libs/data/proposal.js @@ -24,6 +24,9 @@ export default class Proposal { this.id = element.proposal_id || element.id this.status = element.status this.type = element.content.type + if (element.content['@type']) { + this.type = element.content['@type'] + } this.tally = new ProposalTally().init(element.final_tally_result, total) this.submit_time = element.submit_time this.voting_end_time = element.voting_end_time diff --git a/src/views/GovernanceProposalView.vue b/src/views/GovernanceProposalView.vue index 5f2d1ec4..46c7d357 100644 --- a/src/views/GovernanceProposalView.vue +++ b/src/views/GovernanceProposalView.vue @@ -77,13 +77,6 @@ {{ $t('voting_time') }} {{ formatDate(proposal.voting_start_time) }} - {{ formatDate(proposal.voting_end_time) }} - - - {{ $t('proposal_type') }} - - {{ proposal.type }} - -
@@ -91,7 +84,7 @@ :tablefield="proposal.contents" :small="false" />
- + {{ $t('upgrade_time') }} {{ upgradeTime }} @@ -356,7 +349,7 @@ export default { }, computed: { upgradeTime() { - if (this.proposal.type === 'cosmos-sdk/SoftwareUpgradeProposal') { + if (this.proposal.type.indexOf('SoftwareUpgrade') > 0) { if (Number(this.proposal?.contents.plan.height || 0) > 0 && this.latest?.block) { const blocks = Number(this.proposal.contents.plan.height) - Number(this.latest.block?.header?.height || 0) if (blocks > 0) {