mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
prompt to retry on invalid password
This commit is contained in:
parent
6a58e8a799
commit
6068666415
2 changed files with 8 additions and 1 deletions
|
@ -627,7 +627,10 @@ public class AppController implements Initializable {
|
||||||
EventManager.get().post(new StorageEvent(storage.getWalletFile(), TimedEvent.Action.END, "Failed"));
|
EventManager.get().post(new StorageEvent(storage.getWalletFile(), TimedEvent.Action.END, "Failed"));
|
||||||
Throwable exception = loadWalletService.getException();
|
Throwable exception = loadWalletService.getException();
|
||||||
if(exception instanceof InvalidPasswordException) {
|
if(exception instanceof InvalidPasswordException) {
|
||||||
showErrorDialog("Invalid Password", "The wallet password was invalid.");
|
Optional<ButtonType> optResponse = showErrorDialog("Invalid Password", "The wallet password was invalid. Try again?", ButtonType.CANCEL, ButtonType.OK);
|
||||||
|
if(optResponse.isPresent() && optResponse.get().equals(ButtonType.OK)) {
|
||||||
|
Platform.runLater(() -> openWalletFile(file, forceSameWindow));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if(!attemptImportWallet(file, password)) {
|
if(!attemptImportWallet(file, password)) {
|
||||||
log.error("Error Opening Wallet", exception);
|
log.error("Error Opening Wallet", exception);
|
||||||
|
|
|
@ -164,3 +164,7 @@
|
||||||
-fx-background-color: -fx-box-border, derive(-fx-background, 10%);
|
-fx-background-color: -fx-box-border, derive(-fx-background, 10%);
|
||||||
-fx-effect: dropshadow(three-pass-box, #a0a1a7, 14, 0, 0, 0);
|
-fx-effect: dropshadow(three-pass-box, #a0a1a7, 14, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.alert .content.label {
|
||||||
|
-fx-padding: 20px 20px 20px 20px;
|
||||||
|
}
|
Loading…
Reference in a new issue