From e0a662665006ae00a604aad461ef6e0aac67bc8a Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 14 Apr 2023 16:41:47 -0600 Subject: [PATCH] add further guidance when regenerating a border wallets grid --- .../com/sparrowwallet/sparrow/control/MnemonicGridDialog.java | 2 +- .../sparrow/control/MnemonicKeystoreEntryPane.java | 4 ++-- .../com/sparrowwallet/sparrow/control/SeedEntryDialog.java | 4 ++-- src/main/java/com/sparrowwallet/sparrow/io/PdfUtils.java | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/MnemonicGridDialog.java b/src/main/java/com/sparrowwallet/sparrow/control/MnemonicGridDialog.java index fb7f3681..b3338f2c 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/MnemonicGridDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/MnemonicGridDialog.java @@ -251,7 +251,7 @@ public class MnemonicGridDialog extends Dialog> { final ButtonBar.ButtonData buttonData = buttonType.getButtonData(); ButtonBar.setButtonData(generateButton, buttonData); generateButton.setOnAction(event -> { - SeedEntryDialog seedEntryDialog = new SeedEntryDialog(12); + SeedEntryDialog seedEntryDialog = new SeedEntryDialog("Border Wallets Entropy Grid Recovery Seed", 12); Optional> optWords = seedEntryDialog.showAndWait(); if(optWords.isPresent()) { List mnemonicWords = optWords.get(); diff --git a/src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystoreEntryPane.java b/src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystoreEntryPane.java index b61f37f1..de458cab 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystoreEntryPane.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystoreEntryPane.java @@ -18,8 +18,8 @@ public class MnemonicKeystoreEntryPane extends MnemonicKeystorePane { private boolean generated; - public MnemonicKeystoreEntryPane(int numWords) { - super(DeterministicSeed.Type.BIP39.getName(), "Enter seed words", "", "image/" + WalletModel.SEED.getType() + ".png"); + public MnemonicKeystoreEntryPane(String name, int numWords) { + super(name, "Enter seed words", "", "image/" + WalletModel.SEED.getType() + ".png"); showHideLink.setVisible(false); buttonBox.getChildren().clear(); diff --git a/src/main/java/com/sparrowwallet/sparrow/control/SeedEntryDialog.java b/src/main/java/com/sparrowwallet/sparrow/control/SeedEntryDialog.java index 1cd3b9ca..04211f75 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/SeedEntryDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/SeedEntryDialog.java @@ -12,7 +12,7 @@ import java.util.List; public class SeedEntryDialog extends Dialog> { private final MnemonicKeystoreEntryPane keystorePane; - public SeedEntryDialog(int numWords) { + public SeedEntryDialog(String name, int numWords) { final DialogPane dialogPane = new MnemonicGridDialogPane(); setDialogPane(dialogPane); dialogPane.getStylesheets().add(AppServices.class.getResource("general.css").toExternalForm()); @@ -38,7 +38,7 @@ public class SeedEntryDialog extends Dialog> { Accordion keystoreAccordion = new Accordion(); scrollPane.setContent(keystoreAccordion); - keystorePane = new MnemonicKeystoreEntryPane(numWords); + keystorePane = new MnemonicKeystoreEntryPane(name, numWords); keystorePane.setAnimated(false); keystoreAccordion.getPanes().add(keystorePane); diff --git a/src/main/java/com/sparrowwallet/sparrow/io/PdfUtils.java b/src/main/java/com/sparrowwallet/sparrow/io/PdfUtils.java index e738f8b8..af33a0d3 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/PdfUtils.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/PdfUtils.java @@ -210,6 +210,8 @@ public class PdfUtils { log.error("Error creating word grid PDF", e); AppServices.showErrorDialog("Error creating word grid PDF", e.getMessage()); } + } else { + AppServices.showWarningDialog("Entropy Grid PDF not saved", "You have chosen to not save the entropy grid PDF.\n\nDo not store funds on a seed selected from this grid - you will not be able to regenerate it!"); } } }