From 99f41e0feb73cd8c252017bd342c8d0d46fee01e Mon Sep 17 00:00:00 2001 From: woodser Date: Thu, 6 Jun 2024 12:24:45 -0400 Subject: [PATCH] update to monero-java 0.8.29 to fix #995 --- build.gradle | 2 +- .../core/xmr/wallet/XmrWalletService.java | 24 +++++++++---------- gradle/verification-metadata.xml | 6 ++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index c48a3515..39d3bacc 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,7 @@ configure(subprojects) { gsonVersion = '2.8.5' guavaVersion = '32.1.1-jre' guiceVersion = '7.0.0' - moneroJavaVersion = '0.8.27' + moneroJavaVersion = '0.8.29' httpclient5Version = '5.0' hamcrestVersion = '2.2' httpclientVersion = '4.5.12' 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 e6398f9f..073f06f5 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java @@ -1268,6 +1268,18 @@ public class XmrWalletService { private void initialize() { + // try to load native monero library + if (useNativeXmrWallet && !MoneroUtils.isNativeLibraryLoaded()) { + try { + MoneroUtils.loadNativeLibrary(); + } catch (Exception | UnsatisfiedLinkError e) { + log.warn("Failed to load Monero native libraries: " + e.getMessage()); + } + } + String appliedMsg = "Monero native libraries applied: " + isNativeLibraryApplied(); + if (useNativeXmrWallet && !isNativeLibraryApplied()) log.warn(appliedMsg); + else log.info(appliedMsg); + // listen for connection changes xmrConnectionService.addConnectionListener(connection -> { @@ -1290,18 +1302,6 @@ public class XmrWalletService { walletInitListener = (obs, oldVal, newVal) -> initMainWalletIfConnected(); xmrConnectionService.downloadPercentageProperty().addListener(walletInitListener); initMainWalletIfConnected(); - - // try to load native monero library - if (useNativeXmrWallet && !MoneroUtils.isNativeLibraryLoaded()) { - try { - MoneroUtils.loadNativeLibrary(); - } catch (Exception | UnsatisfiedLinkError e) { - log.warn("Failed to load Monero native libraries: " + e.getMessage()); - } - } - String appliedMsg = "Monero native libraries applied: " + isNativeLibraryApplied(); - if (useNativeXmrWallet && !isNativeLibraryApplied()) log.warn(appliedMsg); - else log.info(appliedMsg); } private void initMainWalletIfConnected() { diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index b992996d..5263c656 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -886,9 +886,9 @@ - - - + + +