mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Fix incorrect vote weights in voting history JSON
Make sure to include the BSQ stake, and not just the merit stake, when summing to get the 'voteWeight' field of the vote on each evaluated proposal in the exported vote results history JSON.
This commit is contained in:
parent
57662ae206
commit
74b5580b2c
1 changed files with 3 additions and 3 deletions
|
@ -985,9 +985,9 @@ public class VoteResultView extends ActivatableView<GridPane, Void> implements D
|
|||
voteJson.addProperty("hashOfBlindVoteList", Utilities.bytesAsHexString(decryptedBallotsWithMerits.getHashOfBlindVoteList()));
|
||||
voteJson.addProperty("blindVoteTxId", decryptedBallotsWithMerits.getBlindVoteTxId());
|
||||
voteJson.addProperty("voteRevealTxId", decryptedBallotsWithMerits.getVoteRevealTxId());
|
||||
voteJson.addProperty("stake", decryptedBallotsWithMerits.getStake());
|
||||
|
||||
voteJson.addProperty("voteWeight", meritStakeMap.get(decryptedBallotsWithMerits.getBlindVoteTxId()));
|
||||
long stake = decryptedBallotsWithMerits.getStake();
|
||||
voteJson.addProperty("stake", stake);
|
||||
voteJson.addProperty("voteWeight", stake + meritStakeMap.get(decryptedBallotsWithMerits.getBlindVoteTxId()));
|
||||
String voteResult = decryptedBallotsWithMerits.getVote(evaluatedProp.getProposalTxId())
|
||||
.map(vote -> vote.isAccepted() ? "Accepted" : "Rejected")
|
||||
.orElse("Ignored");
|
||||
|
|
Loading…
Add table
Reference in a new issue