Skip to content

Commit

Permalink
add further guidance when regenerating a border wallets grid
Browse files Browse the repository at this point in the history
  • Loading branch information
craigraw committed Apr 14, 2023
1 parent 1d8888b commit e0a6626
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ protected Node createButton(ButtonType buttonType) {
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<List<String>> optWords = seedEntryDialog.showAndWait();
if(optWords.isPresent()) {
List<String> mnemonicWords = optWords.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class SeedEntryDialog extends Dialog<List<String>> {
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());
Expand All @@ -38,7 +38,7 @@ public SeedEntryDialog(int numWords) {
Accordion keystoreAccordion = new Accordion();
scrollPane.setContent(keystoreAccordion);

keystorePane = new MnemonicKeystoreEntryPane(numWords);
keystorePane = new MnemonicKeystoreEntryPane(name, numWords);
keystorePane.setAnimated(false);
keystoreAccordion.getPanes().add(keystorePane);

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/sparrowwallet/sparrow/io/PdfUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ public static void saveWordGrid(String[][] wordGrid, List<String> mnemonicWords)
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!");
}
}
}

0 comments on commit e0a6626

Please sign in to comment.