instruct to stop monero-wallet-rpc processes on error opening wallet
This commit is contained in:
parent
56e61e611c
commit
ea10093dad
@ -156,7 +156,7 @@ public class WalletAppSetup {
|
|||||||
rejectedTxException.set((RejectedTxException) exception);
|
rejectedTxException.set((RejectedTxException) exception);
|
||||||
getWalletServiceErrorMsg().set(Res.get("mainView.walletServiceErrorMsg.rejectedTxException", exception.getMessage()));
|
getWalletServiceErrorMsg().set(Res.get("mainView.walletServiceErrorMsg.rejectedTxException", exception.getMessage()));
|
||||||
} else {
|
} else {
|
||||||
getWalletServiceErrorMsg().set(Res.get("mainView.walletServiceErrorMsg.connectionError", exception.toString()));
|
getWalletServiceErrorMsg().set(Res.get("mainView.walletServiceErrorMsg.connectionError", exception.getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -232,14 +232,10 @@ public class XmrWalletService {
|
|||||||
public MoneroWalletRpc openWallet(String walletName) {
|
public MoneroWalletRpc openWallet(String walletName) {
|
||||||
log.info("{}.openWallet({})", getClass().getSimpleName(), walletName);
|
log.info("{}.openWallet({})", getClass().getSimpleName(), walletName);
|
||||||
if (isShutDownStarted) throw new IllegalStateException("Cannot open wallet because shutting down");
|
if (isShutDownStarted) throw new IllegalStateException("Cannot open wallet because shutting down");
|
||||||
try {
|
|
||||||
return openWalletRpc(new MoneroWalletConfig()
|
return openWalletRpc(new MoneroWalletConfig()
|
||||||
.setPath(walletName)
|
.setPath(walletName)
|
||||||
.setPassword(getWalletPassword()),
|
.setPassword(getWalletPassword()),
|
||||||
null);
|
null);
|
||||||
} catch (MoneroError e) {
|
|
||||||
throw new IllegalStateException("Could not open wallet '" + walletName + "'. Please close Haveno, stop all monero-wallet-rpc processes, and restart Haveno.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -712,7 +708,7 @@ public class XmrWalletService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
stopWallet(walletRpc, config.getPath());
|
stopWallet(walletRpc, config.getPath());
|
||||||
throw e;
|
throw new IllegalStateException("Could not open wallet '" + config.getPath() + "'. Please close Haveno, stop all monero-wallet-rpc processes, and restart Haveno.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user