mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-01-27 18:51:11 +00:00
fix cancel of create wallet in terminal
This commit is contained in:
parent
011bb86b5f
commit
47f7b8870c
1 changed files with 14 additions and 12 deletions
|
@ -147,17 +147,19 @@ public class MasterActionListBox extends ActionListBox {
|
|||
newWalletNameBuilder.setValidator(content -> content.isEmpty() ? "Please enter a name" : (Storage.walletExists(content) ? "Wallet already exists" : null));
|
||||
String walletName = newWalletNameBuilder.build().showDialog(SparrowTerminal.get().getGui());
|
||||
|
||||
ActionListDialogBuilder newBuilder = new ActionListDialogBuilder();
|
||||
newBuilder.setTitle("Create Wallet");
|
||||
newBuilder.setDescription("Choose the type of wallet");
|
||||
newBuilder.addAction("Software (BIP39)", () -> {
|
||||
Bip39Dialog bip39Dialog = new Bip39Dialog(walletName);
|
||||
bip39Dialog.showDialog(SparrowTerminal.get().getGui());
|
||||
});
|
||||
newBuilder.addAction("Watch Only", () -> {
|
||||
WatchOnlyDialog watchOnlyDialog = new WatchOnlyDialog(walletName);
|
||||
watchOnlyDialog.showDialog(SparrowTerminal.get().getGui());
|
||||
});
|
||||
newBuilder.build().showDialog(SparrowTerminal.get().getGui());
|
||||
if(walletName != null) {
|
||||
ActionListDialogBuilder newBuilder = new ActionListDialogBuilder();
|
||||
newBuilder.setTitle("Create Wallet");
|
||||
newBuilder.setDescription("Choose the type of wallet");
|
||||
newBuilder.addAction("Software (BIP39)", () -> {
|
||||
Bip39Dialog bip39Dialog = new Bip39Dialog(walletName);
|
||||
bip39Dialog.showDialog(SparrowTerminal.get().getGui());
|
||||
});
|
||||
newBuilder.addAction("Watch Only", () -> {
|
||||
WatchOnlyDialog watchOnlyDialog = new WatchOnlyDialog(walletName);
|
||||
watchOnlyDialog.showDialog(SparrowTerminal.get().getGui());
|
||||
});
|
||||
newBuilder.build().showDialog(SparrowTerminal.get().getGui());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue