mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-10 15:40:22 -04:00
update locked -> pending balance
This commit is contained in:
parent
cb10a65a83
commit
f464110fb5
23 changed files with 72 additions and 72 deletions
|
@ -278,21 +278,21 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
|||
}
|
||||
});
|
||||
|
||||
Tuple2<Label, VBox> lockedBalanceBox = getBalanceBox(Res.get("mainView.balance.locked.short"));
|
||||
lockedBalanceBox.first.textProperty().bind(model.getLockedBalance());
|
||||
lockedBalanceBox.first.tooltipProperty().bind(new ObjectBinding<>() {
|
||||
Tuple2<Label, VBox> pendingBalanceBox = getBalanceBox(Res.get("mainView.balance.pending.short"));
|
||||
pendingBalanceBox.first.textProperty().bind(model.getPendingBalance());
|
||||
pendingBalanceBox.first.tooltipProperty().bind(new ObjectBinding<>() {
|
||||
{
|
||||
bind(model.getLockedBalance());
|
||||
bind(model.getPendingBalance());
|
||||
bind(model.getMarketPrice());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Tooltip computeValue() {
|
||||
String tooltipText = Res.get("mainView.balance.locked");
|
||||
String tooltipText = Res.get("mainView.balance.pending");
|
||||
try {
|
||||
String preferredTradeCurrency = model.getPreferences().getPreferredTradeCurrency().getCode();
|
||||
double lockedBalance = Double.parseDouble(
|
||||
model.getLockedBalance().getValue().replace("XMR", ""));
|
||||
model.getPendingBalance().getValue().replace("XMR", ""));
|
||||
double marketPrice = Double.parseDouble(model.getMarketPrice(preferredTradeCurrency).getValue());
|
||||
tooltipText += "\n" + currencyFormat.format(lockedBalance * marketPrice) +
|
||||
" " + preferredTradeCurrency;
|
||||
|
@ -318,7 +318,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
|||
secondaryNav.setAlignment(Pos.CENTER);
|
||||
|
||||
HBox priceAndBalance = new HBox(marketPriceBox.second, getNavigationSeparator(), availableBalanceBox.second,
|
||||
getNavigationSeparator(), lockedBalanceBox.second, getNavigationSeparator(), reservedBalanceBox.second);
|
||||
getNavigationSeparator(), pendingBalanceBox.second, getNavigationSeparator(), reservedBalanceBox.second);
|
||||
priceAndBalance.setMaxHeight(41);
|
||||
|
||||
priceAndBalance.setAlignment(Pos.CENTER);
|
||||
|
|
|
@ -653,8 +653,8 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener
|
|||
return balancePresentation.getReservedBalance();
|
||||
}
|
||||
|
||||
StringProperty getLockedBalance() {
|
||||
return balancePresentation.getLockedBalance();
|
||||
StringProperty getPendingBalance() {
|
||||
return balancePresentation.getPendingBalance();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue