mirror of
https://github.com/bisq-network/bisq.git
synced 2025-01-18 21:35:03 +01:00
Reputation BSQ added to BSQ Wallet screen (#3366)
* BSQ Merit now displayed - fixes issue #3352 * Broke merit text setting to 2 lines. * Fix formatting
This commit is contained in:
commit
06f0d6b191
@ -1525,6 +1525,7 @@ dao.lockedForVoteBalance=Used for voting
|
||||
dao.lockedInBonds=Locked in bonds
|
||||
dao.availableNonBsqBalance=Available non-BSQ balance (BTC)
|
||||
dao.totalBsqBalance=Total BSQ balance
|
||||
dao.reputationBalance=Merit Value (not spendable)
|
||||
|
||||
dao.tx.published.success=Your transaction has been successfully published.
|
||||
dao.proposal.menuItem.make=Make proposal
|
||||
|
@ -23,6 +23,7 @@ import bisq.desktop.util.Layout;
|
||||
|
||||
import bisq.core.btc.listeners.BsqBalanceListener;
|
||||
import bisq.core.btc.wallet.BsqWalletService;
|
||||
import bisq.core.dao.DaoFacade;
|
||||
import bisq.core.dao.state.DaoStateListener;
|
||||
import bisq.core.dao.state.DaoStateService;
|
||||
import bisq.core.dao.state.model.blockchain.Block;
|
||||
@ -49,11 +50,12 @@ public class BsqBalanceUtil implements BsqBalanceListener, DaoStateListener {
|
||||
private final BsqWalletService bsqWalletService;
|
||||
private final DaoStateService daoStateService;
|
||||
private final BsqFormatter bsqFormatter;
|
||||
private final DaoFacade daoFacade;
|
||||
|
||||
// Displaying general BSQ info
|
||||
private TextField availableBalanceTextField, verifiedBalanceTextField, availableNonBsqBalanceTextField,
|
||||
unverifiedBalanceTextField, lockedForVoteBalanceTextField,
|
||||
lockedInBondsBalanceTextField, unconfirmedChangTextField;
|
||||
lockedInBondsBalanceTextField, unconfirmedChangTextField, reputationBalanceTextField;
|
||||
|
||||
// Displaying bond dashboard info
|
||||
private TextField lockupAmountTextField, unlockingAmountTextField;
|
||||
@ -62,10 +64,12 @@ public class BsqBalanceUtil implements BsqBalanceListener, DaoStateListener {
|
||||
@Inject
|
||||
private BsqBalanceUtil(BsqWalletService bsqWalletService,
|
||||
DaoStateService daoStateService,
|
||||
BsqFormatter bsqFormatter) {
|
||||
BsqFormatter bsqFormatter,
|
||||
DaoFacade daoFacade) {
|
||||
this.bsqWalletService = bsqWalletService;
|
||||
this.daoStateService = daoStateService;
|
||||
this.bsqFormatter = bsqFormatter;
|
||||
this.daoFacade = daoFacade;
|
||||
}
|
||||
|
||||
|
||||
@ -125,6 +129,8 @@ public class BsqBalanceUtil implements BsqBalanceListener, DaoStateListener {
|
||||
availableNonBsqBalanceTextField.setVisible(isNonBsqBalanceAvailable);
|
||||
availableNonBsqBalanceTextField.setManaged(isNonBsqBalanceAvailable);
|
||||
availableNonBsqBalanceTextField.setText(bsqFormatter.formatBTCWithCode(availableNonBsqBalance.value));
|
||||
String bsqSatoshi = bsqFormatter.formatBSQSatoshisWithCode(daoFacade.getAvailableMerit());
|
||||
reputationBalanceTextField.setText(bsqSatoshi);
|
||||
}
|
||||
|
||||
|
||||
@ -162,6 +168,8 @@ public class BsqBalanceUtil implements BsqBalanceListener, DaoStateListener {
|
||||
Res.get("dao.lockedForVoteBalance"), Layout.FIRST_ROW_DISTANCE).second;
|
||||
lockedInBondsBalanceTextField = FormBuilder.addTopLabelReadOnlyTextField(gridPane, ++gridRow, columnIndex,
|
||||
Res.get("dao.lockedInBonds")).second;
|
||||
reputationBalanceTextField = FormBuilder.addTopLabelReadOnlyTextField(gridPane, ++gridRow, columnIndex,
|
||||
Res.get("dao.reputationBalance")).second;
|
||||
Tuple3<Label, TextField, VBox> tuple3 = FormBuilder.addTopLabelReadOnlyTextField(gridPane, ++gridRow, columnIndex,
|
||||
Res.get("dao.availableNonBsqBalance"));
|
||||
// Match left column
|
||||
|
Loading…
Reference in New Issue
Block a user