[bisq-network/bisq] Reputation BSQ added to BSQ Wallet screen (#3366)

chimp1984 notifications at github.com
Mon Oct 7 03:30:22 UTC 2019


chimp1984 requested changes on this pull request.

NACK - if my interpretation is correct.

> +	                            bsqWalletService,
+	                            btcWalletService,
+	                            daoFacade,
+	                            // Use tx.getIncludedInBestChainAt() when available, otherwise use tx.getUpdateTime()
+	                            transaction.getIncludedInBestChainAt() != null ? transaction.getIncludedInBestChainAt() : transaction.getUpdateTime(),
+	                            bsqFormatter);
+	                }).filter(new Predicate<BsqTxListItem>() {
+	        			@Override
+	        			public boolean test(BsqTxListItem t) {
+	        				return TxType.COMPENSATION_REQUEST.equals(t.getTxType()) || TxType.REIMBURSEMENT_REQUEST.equals(t.getTxType());
+	        			}
+	        		}).mapToLong(i -> i.getAmount().getValue()).sum();
+	        
+	        reputationBalanceTextField.setText(bsqFormatter.formatCoinWithCode(Coin.valueOf(reputationSum)));
+		}).start();
+    }

If you refer with reputation to the merit used in voting this is not a correct implementation.
The merit has a decline function over 2 years. The DAO domain contains methods to get that correct value (see in UI code for voting as there it is displayed).
Also you should avoid to call the UI thread from other threads, can cause issues.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3366#pullrequestreview-297891961
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191006/f8177ea6/attachment-0001.html>


More information about the bisq-github mailing list