diff --git a/core/src/main/java/bisq/core/dao/DaoFacade.java b/core/src/main/java/bisq/core/dao/DaoFacade.java index 7c5c90f772a..565a3737b5a 100644 --- a/core/src/main/java/bisq/core/dao/DaoFacade.java +++ b/core/src/main/java/bisq/core/dao/DaoFacade.java @@ -689,7 +689,11 @@ public Coin getMaxReimbursementRequestAmount() { } public String getParamValue(Param param) { - return daoStateService.getParamValue(param, periodService.getChainHeight()); + return getParamValue(param, periodService.getChainHeight()); + } + + public String getParamValue(Param param, int blockHeight) { + return daoStateService.getParamValue(param, blockHeight); } public void resyncDao(Runnable resultHandler) { diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index e996fec422b..c29d0c4a5e7 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -1473,6 +1473,7 @@ dao.param.BONDED_ROLE_FACTOR=Bonded role unit factor in BSQ dao.param.ISSUANCE_LIMIT=Issuance limit per cycle in BSQ dao.param.currentValue=Current value: {0} +dao.param.currentAndPastValue=Current value: {0} (Value when proposal was made: {1}) dao.param.blocks={0} blocks dao.results.cycle.duration.label=Duration of {0} diff --git a/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java b/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java index 0779dc3cc62..203fa4d1929 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java @@ -39,6 +39,7 @@ import bisq.core.dao.governance.proposal.ProposalType; import bisq.core.dao.governance.proposal.param.ChangeParamInputValidator; import bisq.core.dao.governance.proposal.param.ChangeParamValidator; +import bisq.core.dao.state.model.blockchain.BaseTx; import bisq.core.dao.state.model.blockchain.Tx; import bisq.core.dao.state.model.governance.Ballot; import bisq.core.dao.state.model.governance.BondedRoleType; @@ -547,6 +548,14 @@ public void applyProposalPayload(Proposal proposal) { comboBoxValueTextField.setText(paramComboBox.getConverter().toString(changeParamProposal.getParam())); checkNotNull(paramValueTextField, "paramValueTextField must not be null"); paramValueTextField.setText(bsqFormatter.formatParamValue(changeParamProposal.getParam(), changeParamProposal.getParamValue())); + String currentValue = bsqFormatter.formatParamValue(changeParamProposal.getParam(), + daoFacade.getParamValue(changeParamProposal.getParam())); + int height = daoFacade.getTx(changeParamProposal.getTxId()) + .map(BaseTx::getBlockHeight) + .orElse(daoFacade.getGenesisBlockHeight()); + String valueAtProposal = bsqFormatter.formatParamValue(changeParamProposal.getParam(), + daoFacade.getParamValue(changeParamProposal.getParam(), height)); + paramValueTextField.setPromptText(Res.get("dao.param.currentAndPastValue", currentValue, valueAtProposal)); } else if (proposal instanceof RoleProposal) { RoleProposal roleProposal = (RoleProposal) proposal; checkNotNull(bondedRoleTypeComboBox, "bondedRoleComboBox must not be null");