From 82b8f58579589880d53fbec1bef93912ecbca79c Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 17 May 2024 11:54:28 -0400 Subject: [PATCH] show popup with message on error starting monero wallet --- core/src/main/java/haveno/core/api/XmrConnectionService.java | 3 --- .../src/main/java/haveno/core/xmr/wallet/XmrWalletService.java | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/haveno/core/api/XmrConnectionService.java b/core/src/main/java/haveno/core/api/XmrConnectionService.java index b0e1a96247..48ba17b55f 100644 --- a/core/src/main/java/haveno/core/api/XmrConnectionService.java +++ b/core/src/main/java/haveno/core/api/XmrConnectionService.java @@ -649,9 +649,6 @@ public final class XmrConnectionService { log.info("Successfully fetched daemon info after previous error"); lastErrorTimestamp = null; } - - // clear error message - if (HavenoUtils.havenoSetup != null) HavenoUtils.havenoSetup.getWalletServiceErrorMsg().set(null); } catch (Exception e) { // not connected to daemon diff --git a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java index 0e4726f6e7..933b25903b 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java @@ -1321,6 +1321,7 @@ public class XmrWalletService { } catch (Exception e) { log.warn("Error initializing main wallet: " + e.getMessage()); e.printStackTrace(); + HavenoUtils.havenoSetup.getWalletServiceErrorMsg().set(e.getMessage()); throw e; } } @@ -1592,7 +1593,7 @@ public class XmrWalletService { } catch (Exception e) { e.printStackTrace(); if (walletRpc != null) forceCloseWallet(walletRpc, config.getPath()); - throw new IllegalStateException("Could not open wallet '" + config.getPath() + "'. Please close Haveno, stop all monero-wallet-rpc processes, and restart Haveno."); + throw new IllegalStateException("Could not open wallet '" + config.getPath() + "'. Please close Haveno, stop all monero-wallet-rpc processes, and restart Haveno.\n\nError message: " + e.getMessage()); } }