add further guidance when regenerating a border wallets grid

This commit is contained in:
Craig Raw 2023-04-14 16:41:47 -06:00
parent 1d8888bb14
commit e0a6626650
4 changed files with 7 additions and 5 deletions

View file

@ -251,7 +251,7 @@ public class MnemonicGridDialog extends Dialog<List<String>> {
final ButtonBar.ButtonData buttonData = buttonType.getButtonData(); final ButtonBar.ButtonData buttonData = buttonType.getButtonData();
ButtonBar.setButtonData(generateButton, buttonData); ButtonBar.setButtonData(generateButton, buttonData);
generateButton.setOnAction(event -> { generateButton.setOnAction(event -> {
SeedEntryDialog seedEntryDialog = new SeedEntryDialog(12); SeedEntryDialog seedEntryDialog = new SeedEntryDialog("Border Wallets Entropy Grid Recovery Seed", 12);
Optional<List<String>> optWords = seedEntryDialog.showAndWait(); Optional<List<String>> optWords = seedEntryDialog.showAndWait();
if(optWords.isPresent()) { if(optWords.isPresent()) {
List<String> mnemonicWords = optWords.get(); List<String> mnemonicWords = optWords.get();

View file

@ -18,8 +18,8 @@ public class MnemonicKeystoreEntryPane extends MnemonicKeystorePane {
private boolean generated; private boolean generated;
public MnemonicKeystoreEntryPane(int numWords) { public MnemonicKeystoreEntryPane(String name, int numWords) {
super(DeterministicSeed.Type.BIP39.getName(), "Enter seed words", "", "image/" + WalletModel.SEED.getType() + ".png"); super(name, "Enter seed words", "", "image/" + WalletModel.SEED.getType() + ".png");
showHideLink.setVisible(false); showHideLink.setVisible(false);
buttonBox.getChildren().clear(); buttonBox.getChildren().clear();

View file

@ -12,7 +12,7 @@ import java.util.List;
public class SeedEntryDialog extends Dialog<List<String>> { public class SeedEntryDialog extends Dialog<List<String>> {
private final MnemonicKeystoreEntryPane keystorePane; private final MnemonicKeystoreEntryPane keystorePane;
public SeedEntryDialog(int numWords) { public SeedEntryDialog(String name, int numWords) {
final DialogPane dialogPane = new MnemonicGridDialogPane(); final DialogPane dialogPane = new MnemonicGridDialogPane();
setDialogPane(dialogPane); setDialogPane(dialogPane);
dialogPane.getStylesheets().add(AppServices.class.getResource("general.css").toExternalForm()); dialogPane.getStylesheets().add(AppServices.class.getResource("general.css").toExternalForm());
@ -38,7 +38,7 @@ public class SeedEntryDialog extends Dialog<List<String>> {
Accordion keystoreAccordion = new Accordion(); Accordion keystoreAccordion = new Accordion();
scrollPane.setContent(keystoreAccordion); scrollPane.setContent(keystoreAccordion);
keystorePane = new MnemonicKeystoreEntryPane(numWords); keystorePane = new MnemonicKeystoreEntryPane(name, numWords);
keystorePane.setAnimated(false); keystorePane.setAnimated(false);
keystoreAccordion.getPanes().add(keystorePane); keystoreAccordion.getPanes().add(keystorePane);

View file

@ -210,6 +210,8 @@ public class PdfUtils {
log.error("Error creating word grid PDF", e); log.error("Error creating word grid PDF", e);
AppServices.showErrorDialog("Error creating word grid PDF", e.getMessage()); 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!");
} }
} }
} }