mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
improvements to whirlpool dialog
This commit is contained in:
parent
615b78b497
commit
57b3214c54
3 changed files with 54 additions and 6 deletions
|
@ -94,6 +94,11 @@ public class WhirlpoolController {
|
|||
Config.get().setScode(newValue);
|
||||
});
|
||||
|
||||
if(Config.get().getScode() != null) {
|
||||
step1.setVisible(false);
|
||||
step3.setVisible(true);
|
||||
}
|
||||
|
||||
pool.setConverter(new StringConverter<Pool>() {
|
||||
@Override
|
||||
public String toString(Pool pool) {
|
||||
|
@ -219,6 +224,10 @@ public class WhirlpoolController {
|
|||
}
|
||||
|
||||
private void fetchTx0Preview(Pool pool) {
|
||||
if(Config.get().getScode() == null) {
|
||||
Config.get().setScode("");
|
||||
}
|
||||
|
||||
Whirlpool whirlpool = AppServices.get().getWhirlpool(walletId);
|
||||
whirlpool.setScode(Config.get().getScode());
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.sparrowwallet.sparrow.whirlpool;
|
||||
|
||||
import com.samourai.whirlpool.client.tx0.Tx0Preview;
|
||||
import com.samourai.whirlpool.client.whirlpool.beans.Pool;
|
||||
import com.sparrowwallet.drongo.wallet.Wallet;
|
||||
import com.sparrowwallet.sparrow.AppServices;
|
||||
import com.sparrowwallet.sparrow.io.Config;
|
||||
import com.sparrowwallet.sparrow.wallet.UtxoEntry;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
|
@ -27,9 +27,10 @@ public class WhirlpoolDialog extends Dialog<Tx0Preview> {
|
|||
whirlpoolController.initializeView(walletId, wallet, utxoEntries);
|
||||
|
||||
dialogPane.setPrefWidth(600);
|
||||
dialogPane.setPrefHeight(520);
|
||||
dialogPane.setPrefHeight(550);
|
||||
AppServices.moveToActiveWindowScreen(this);
|
||||
|
||||
dialogPane.getStylesheets().add(AppServices.class.getResource("app.css").toExternalForm());
|
||||
dialogPane.getStylesheets().add(AppServices.class.getResource("whirlpool/whirlpool.css").toExternalForm());
|
||||
|
||||
final ButtonType nextButtonType = new javafx.scene.control.ButtonType("Next", ButtonBar.ButtonData.OK_DONE);
|
||||
|
@ -53,7 +54,9 @@ public class WhirlpoolDialog extends Dialog<Tx0Preview> {
|
|||
backButton.managedProperty().bind(backButton.visibleProperty());
|
||||
previewButton.managedProperty().bind(previewButton.visibleProperty());
|
||||
|
||||
backButton.setDisable(true);
|
||||
if(Config.get().getScode() == null) {
|
||||
backButton.setDisable(true);
|
||||
}
|
||||
previewButton.visibleProperty().bind(nextButton.visibleProperty().not());
|
||||
|
||||
nextButton.addEventFilter(ActionEvent.ACTION, event -> {
|
||||
|
|
|
@ -39,9 +39,45 @@
|
|||
<Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="20" icon="RANDOM" styleClass="title-icon" />
|
||||
</graphic>
|
||||
</Label>
|
||||
<Label text="Initiating your first CoinJoin in Sparrow will add three new wallets to your existing wallet: Premix, Postmix and Badbank." wrapText="true" styleClass="content-text" />
|
||||
<Label text="Premix contains UTXOs that have been split from your deposit UTXOs into equal amounts, waiting for their first mixing round. Postmix contains UTXOs that have been through at least one mixing round. Badbank contains any change from your premix transaction." wrapText="true" styleClass="content-text" />
|
||||
<Label text="Click on the tabs at the right of the wallet to use these wallets. Note that they will have reduced functionality (for example they will not display receiving addresses)." wrapText="true" styleClass="content-text" />
|
||||
<HBox>
|
||||
<VBox spacing="15">
|
||||
<Label text="Initiating your first CoinJoin in Sparrow will add three new wallets to your existing wallet: Premix, Postmix and Badbank." wrapText="true" styleClass="content-text" />
|
||||
<Label text="Premix contains UTXOs that have been split from your deposit UTXOs into equal amounts, waiting for their first mixing round. Postmix contains UTXOs that have been through at least one mixing round. Badbank contains any change from your premix transaction, and should be treated carefully." wrapText="true" styleClass="content-text" />
|
||||
<Label text="Click on the tabs at the right of the wallet to use these wallets. Note that they will have reduced functionality (for example they will not display receiving addresses)." wrapText="true" styleClass="content-text" />
|
||||
</VBox>
|
||||
<TabPane side="RIGHT" rotateGraphic="true" styleClass="wallet-subtabs" minWidth="100" minHeight="280">
|
||||
<Tab text="" closable="false">
|
||||
<graphic>
|
||||
<Label text="Premix" contentDisplay="TOP">
|
||||
<graphic>
|
||||
<Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="12" icon="RANDOM" />
|
||||
</graphic>
|
||||
</Label>
|
||||
</graphic>
|
||||
<HBox/>
|
||||
</Tab>
|
||||
<Tab text="" closable="false">
|
||||
<graphic>
|
||||
<Label text="Postmix" contentDisplay="TOP">
|
||||
<graphic>
|
||||
<Glyph fontFamily="FontAwesome" fontSize="12" icon="SEND" />
|
||||
</graphic>
|
||||
</Label>
|
||||
</graphic>
|
||||
<HBox/>
|
||||
</Tab>
|
||||
<Tab text="" closable="false">
|
||||
<graphic>
|
||||
<Label text="Badbank" contentDisplay="TOP">
|
||||
<graphic>
|
||||
<Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="12" icon="BIOHAZARD" />
|
||||
</graphic>
|
||||
</Label>
|
||||
</graphic>
|
||||
<HBox/>
|
||||
</Tab>
|
||||
</TabPane>
|
||||
</HBox>
|
||||
</VBox>
|
||||
<VBox fx:id="step3" spacing="15">
|
||||
<Label text="Configure Whirlpool" styleClass="title-text">
|
||||
|
|
Loading…
Reference in a new issue