mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Fix % display
This commit is contained in:
parent
26fd61defb
commit
43155b8926
2 changed files with 2 additions and 2 deletions
|
@ -556,7 +556,7 @@ public class BSFormatter {
|
||||||
String input = percentString.replace("%", "");
|
String input = percentString.replace("%", "");
|
||||||
input = cleanDoubleInput(input);
|
input = cleanDoubleInput(input);
|
||||||
double value = Double.parseDouble(input);
|
double value = Double.parseDouble(input);
|
||||||
return value / 100d;
|
return MathUtils.roundDouble(value / 100d, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public long parsePriceStringToLong(String currencyCode, String amount, int precision) {
|
public long parsePriceStringToLong(String currencyCode, String amount, int precision) {
|
||||||
|
|
|
@ -441,7 +441,7 @@ public class ProposalDisplay {
|
||||||
Res.get("dao.proposal.voteResult.failed");
|
Res.get("dao.proposal.voteResult.failed");
|
||||||
ProposalVoteResult proposalVoteResult = evaluatedProposal.getProposalVoteResult();
|
ProposalVoteResult proposalVoteResult = evaluatedProposal.getProposalVoteResult();
|
||||||
String threshold = (proposalVoteResult.getThreshold() / 100D) + "%";
|
String threshold = (proposalVoteResult.getThreshold() / 100D) + "%";
|
||||||
String requiredThreshold = (daoFacade.getRequiredThreshold(evaluatedProposal.getProposal()) / 100D) + "%";
|
String requiredThreshold = (daoFacade.getRequiredThreshold(evaluatedProposal.getProposal()) * 100D) + "%";
|
||||||
String quorum = bsqFormatter.formatCoinWithCode(Coin.valueOf(proposalVoteResult.getQuorum()));
|
String quorum = bsqFormatter.formatCoinWithCode(Coin.valueOf(proposalVoteResult.getQuorum()));
|
||||||
String requiredQuorum = bsqFormatter.formatCoinWithCode(daoFacade.getRequiredQuorum(evaluatedProposal.getProposal()));
|
String requiredQuorum = bsqFormatter.formatCoinWithCode(daoFacade.getRequiredQuorum(evaluatedProposal.getProposal()));
|
||||||
String summary = Res.get("dao.proposal.voteResult.summary", result,
|
String summary = Res.get("dao.proposal.voteResult.summary", result,
|
||||||
|
|
Loading…
Add table
Reference in a new issue