diff --git a/src/modules/[chain]/gov/[proposal_id].vue b/src/modules/[chain]/gov/[proposal_id].vue index ec3650f3..1f640c2c 100644 --- a/src/modules/[chain]/gov/[proposal_id].vue +++ b/src/modules/[chain]/gov/[proposal_id].vue @@ -54,8 +54,35 @@ store.fetchProposal(props.proposal_id).then((res) => { }) }) } + + const msgType = proposalDetail.content['@type'] || ''; + if(msgType.endsWith('MsgUpdateParams')) { + if(msgType.indexOf('staking') > -1) { + chainStore.rpc.getStakingParams().then((res) => { + addCurrentParams(res); + }); + } else if(msgType.indexOf('gov') > -1) { + chainStore.rpc.getGovParamsVoting().then((res) => { + addCurrentParams(res); + }); + } else if(msgType.indexOf('distribution') > -1) { + chainStore.rpc.getDistributionParams().then((res) => { + addCurrentParams(res); + }); + } else if(msgType.indexOf('slashing') > -1) { + chainStore.rpc.getSlashingParams().then((res) => { + addCurrentParams(res); + }); + } + } }); +function addCurrentParams(res: any) { + if(proposal.value.content && res.params) { + proposal.value.content.params = [proposal.value.content?.params]; + proposal.value.content.current = [res.params]; + } +} const color = computed(() => { if (proposal.value.status === 'PROPOSAL_STATUS_PASSED') { return 'success'; diff --git a/src/types/gov.ts b/src/types/gov.ts index 96dbe070..5f1b47dd 100644 --- a/src/types/gov.ts +++ b/src/types/gov.ts @@ -31,6 +31,7 @@ export interface GovProposal { description?: string; current?: any[]; changes?: any[]; + params?: any[]; plan?: { height?: string | number; time?: string | number;