mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
add further guidance when regenerating a border wallets grid
This commit is contained in:
parent
1d8888bb14
commit
e0a6626650
4 changed files with 7 additions and 5 deletions
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue