add border wallets number grid support

This commit is contained in:
Craig Raw 2023-04-06 14:57:56 +02:00
parent 483e4c8f38
commit 04145bde74
2 changed files with 8 additions and 0 deletions

View file

@ -148,6 +148,13 @@ public class MnemonicGridDialog extends Dialog<List<String>> {
break; break;
} }
} }
try {
int index = Integer.parseInt(abbreviation);
words.add(Bip39MnemonicCode.INSTANCE.getWordList().get(index - 1));
} catch(NumberFormatException e) {
//ignore
}
} }
if(words.size() != abbreviations.size()) { if(words.size() != abbreviations.size()) {

View file

@ -100,6 +100,7 @@ public class MnemonicKeystorePane extends TitledDescriptionPane {
Optional<List<String>> optWords = mnemonicGridDialog.showAndWait(); Optional<List<String>> optWords = mnemonicGridDialog.showAndWait();
if(optWords.isPresent()) { if(optWords.isPresent()) {
List<String> words = optWords.get(); List<String> words = optWords.get();
defaultWordSizeProperty.set(words.size() + 1);
setContent(getMnemonicWordsEntry(words.size() + 1, true, true)); setContent(getMnemonicWordsEntry(words.size() + 1, true, true));
setExpanded(true); setExpanded(true);