upgrade controlsfx, fix notifications bug

This commit is contained in:
Craig Raw
2020-08-17 16:48:31 +02:00
parent fa7d09c5a6
commit e1934c99bc
4 changed files with 9 additions and 4 deletions
@@ -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();
}
}
@@ -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<String, String> getSubscribedScriptHashes() {
public static Map<String, String> getSubscribedScriptHashes() {
return subscribedScriptHashes;
}