diff --git a/build.gradle b/build.gradle index 36a8ea92..85ee4d7f 100644 --- a/build.gradle +++ b/build.gradle @@ -45,7 +45,7 @@ dependencies { exclude group: 'com.nativelibs4java', module: 'bridj' } implementation('de.codecentric.centerdevice:centerdevice-nsmenufx:2.1.7') - implementation('org.controlsfx:controlsfx:11.0.1' ) { + implementation('org.controlsfx:controlsfx:11.0.2' ) { exclude group: 'org.openjfx', module: 'javafx-base' exclude group: 'org.openjfx', module: 'javafx-graphics' exclude group: 'org.openjfx', module: 'javafx-controls' diff --git a/drongo b/drongo index 6a2af38b..f0aa9491 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit 6a2af38b8a628f36b75c11626b0a8fd608e9d5a0 +Subproject commit f0aa9491746cfa9d12630ff1f5ccdcf97cc4aa90 diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java index 649402e4..0138e6c7 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppController.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java @@ -1007,6 +1007,11 @@ public class AppController implements Initializable { .threshold(5, Notifications.create().title("Sparrow").text("Multiple new wallet transactions").graphic(new ImageView(image))) .onAction(e -> selectTab(event.getWallet())); + //If controlsfx can't find our window, we must set the window ourselves (unfortunately notification is then shown within this window) + if(org.controlsfx.tools.Utils.getWindow(null) == null) { + notificationBuilder.owner(tabs.getScene().getWindow()); + } + notificationBuilder.show(); } } diff --git a/src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java b/src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java index 9a23fd3f..f4ba8921 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java @@ -535,13 +535,13 @@ public class ElectrumServer { return Utils.bytesToHex(reversed); } - private String getScriptHash(TransactionOutput output) { + public static String getScriptHash(TransactionOutput output) { byte[] hash = Sha256Hash.hash(output.getScript().getProgram()); byte[] reversed = Utils.reverseBytes(hash); return Utils.bytesToHex(reversed); } - static Map getSubscribedScriptHashes() { + public static Map getSubscribedScriptHashes() { return subscribedScriptHashes; }