add mix selected button to the postmix account in desktop and terminal

This commit is contained in:
Craig Raw 2024-04-18 13:22:50 +02:00
parent c407a41475
commit 31346e2afa
4 changed files with 17 additions and 3 deletions

2
drongo

@ -1 +1 @@
Subproject commit 42de57026c2c2d8f0feaa2e7a9db33e4decc617f
Subproject commit 3f4ee7af747b80976cda8ebd3c687b6a4ba5ea3f

View file

@ -166,7 +166,14 @@ public class UtxosDialog extends WalletDialog {
AppServices.onlineProperty().addListener(new WeakChangeListener<>(mixingOnlineListener));
if(WhirlpoolServices.canWalletMix(getWalletForm().getWallet())) {
mixSelected = new Button("Mix Selected", this::mixSelected);
mixSelected.setEnabled(false);
buttonPanel.addComponent(mixSelected);
} else {
buttonPanel.addComponent(new EmptySpace(new TerminalSize(15, 1)));
}
buttonPanel.addComponent(new Button("Back", () -> onBack(Function.UTXOS)));
buttonPanel.addComponent(new Button("Refresh", this::onRefresh));
} else {

View file

@ -179,6 +179,11 @@ public class UtxosController extends WalletFormController implements Initializab
}
}
selectAll.managedProperty().bind(selectAll.visibleProperty());
selectAll.setVisible(getWalletForm().getWallet().getStandardAccountType() != StandardAccount.WHIRLPOOL_POSTMIX);
clear.managedProperty().bind(clear.visibleProperty());
clear.setVisible(getWalletForm().getWallet().getStandardAccountType() != StandardAccount.WHIRLPOOL_POSTMIX);
clear.setDisable(true);
sendSelected.setDisable(true);
sendSelected.setTooltip(new Tooltip("Send selected UTXOs. Use " + (org.controlsfx.tools.Platform.getCurrent() == org.controlsfx.tools.Platform.OSX ? "Cmd" : "Ctrl") + "+click to select multiple." ));

View file

@ -18,8 +18,10 @@ public class WalletUtxosEntry extends Entry {
super(wallet, wallet.getName(), wallet.getWalletUtxos().entrySet().stream().map(entry -> new UtxoEntry(entry.getValue().getWallet(), entry.getKey(), HashIndexEntry.Type.OUTPUT, entry.getValue())).collect(Collectors.toList()));
calculateDuplicates();
calculateDust();
if(wallet.isWhirlpoolMixWallet()) {
updateMixProgress();
}
}
@Override
public Long getValue() {