diff --git a/build.gradle b/build.gradle index aa39ee56..14823bfc 100644 --- a/build.gradle +++ b/build.gradle @@ -117,6 +117,10 @@ processResources { } } +test { + jvmArgs '--add-opens=java.base/java.io=ALL-UNNAMED' +} + run { applicationDefaultJvmArgs = ["--add-opens=javafx.graphics/com.sun.javafx.css=org.controlsfx.controls", "--add-opens=javafx.graphics/javafx.scene=org.controlsfx.controls", @@ -198,7 +202,7 @@ jlink { imageName = "Sparrow" installerName = "Sparrow" appVersion = "${sparrowVersion}" - skipInstaller = os.macOsX + skipInstaller = os.macOsX || properties.skipInstallers imageOptions = [] installerOptions = ['--file-associations', 'src/main/deploy/psbt.properties', '--file-associations', 'src/main/deploy/txn.properties', '--file-associations', 'src/main/deploy/bitcoin.properties', '--file-associations', 'src/main/deploy/aopp.properties', '--license-file', 'LICENSE'] if(os.windows) { diff --git a/drongo b/drongo index 0b40c20a..38783d68 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit 0b40c20ab252e29ac192bca34d834b8c3eed04a0 +Subproject commit 38783d68a49ecf5d8c8640edb299d693f455b2a9 diff --git a/src/main/java/com/sparrowwallet/sparrow/AppServices.java b/src/main/java/com/sparrowwallet/sparrow/AppServices.java index 535ab430..afa3471c 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppServices.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppServices.java @@ -793,6 +793,7 @@ public class AppServices { @Subscribe public void newConnection(ConnectionEvent event) { currentBlockHeight = event.getBlockHeight(); + System.setProperty(Network.BLOCK_HEIGHT_PROPERTY, Integer.toString(currentBlockHeight)); targetBlockFeeRates = event.getTargetBlockFeeRates(); addMempoolRateSizes(event.getMempoolRateSizes()); minimumRelayFeeRate = event.getMinimumRelayFeeRate(); @@ -807,6 +808,7 @@ public class AppServices { @Subscribe public void newBlock(NewBlockEvent event) { currentBlockHeight = event.getHeight(); + System.setProperty(Network.BLOCK_HEIGHT_PROPERTY, Integer.toString(currentBlockHeight)); latestBlockHeader = event.getBlockHeader(); String status = "Updating to new block height " + event.getHeight(); EventManager.get().post(new StatusEvent(status)); diff --git a/src/main/java/com/sparrowwallet/sparrow/control/AddressTreeTable.java b/src/main/java/com/sparrowwallet/sparrow/control/AddressTreeTable.java index ec72a686..a00d1e21 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/AddressTreeTable.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/AddressTreeTable.java @@ -34,7 +34,7 @@ public class AddressTreeTable extends CoinTreeTable { addressCol.setSortable(false); getColumns().add(addressCol); - if(address != null && !rootEntry.getWallet().isWhirlpoolMixWallet()) { + if(address != null && !rootEntry.getWallet().isWhirlpoolChildWallet()) { addressCol.setMinWidth(TextUtils.computeTextWidth(AppServices.getMonospaceFont(), address, 0.0)); } diff --git a/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java b/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java index 3cb0724a..339b4fdc 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java @@ -131,7 +131,7 @@ public class EntryCell extends TreeTableCell { setGraphic(actionBox); - if(nodeEntry.getWallet().isWhirlpoolMixWallet()) { + if(nodeEntry.getWallet().isWhirlpoolChildWallet()) { setText(address.toString().substring(0, 20) + "..."); setContextMenu(null); setGraphic(new HBox()); diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/AddressesController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/AddressesController.java index 38452b28..3534a518 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/AddressesController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/AddressesController.java @@ -115,7 +115,7 @@ public class AddressesController extends WalletFormController implements Initial fileChooser.setTitle("Export Addresses to CSV"); fileChooser.setInitialFileName(getWalletForm().getWallet().getFullName() + "-" + keyPurpose.name().toLowerCase() + "-addresses.csv"); - boolean whirlpoolMixWallet = getWalletForm().getWallet().isWhirlpoolMixWallet(); + boolean whirlpoolChildWallet = getWalletForm().getWallet().isWhirlpoolChildWallet(); Wallet copy = getWalletForm().getWallet().copy(); WalletNode purposeNode = copy.getNode(keyPurpose); purposeNode.fillToIndex(Math.max(purposeNode.getChildren().size(), DEFAULT_EXPORT_ADDRESSES_LENGTH)); @@ -128,7 +128,7 @@ public class AddressesController extends WalletFormController implements Initial writer.writeRecord(new String[] {"Index", "Payment Address", "Derivation", "Label"}); for(WalletNode indexNode : purposeNode.getChildren()) { writer.write(Integer.toString(indexNode.getIndex())); - writer.write(whirlpoolMixWallet ? copy.getAddress(indexNode).toString().substring(0, 20) + "..." : copy.getAddress(indexNode).toString()); + writer.write(whirlpoolChildWallet ? copy.getAddress(indexNode).toString().substring(0, 20) + "..." : copy.getAddress(indexNode).toString()); writer.write(getDerivationPath(indexNode)); Optional optLabelEntry = getWalletForm().getNodeEntry(keyPurpose).getChildren().stream() .filter(entry -> ((NodeEntry)entry).getNode().getIndex() == indexNode.getIndex()).findFirst(); diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java index e5133982..19f8251d 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java @@ -78,7 +78,7 @@ public class WalletController extends WalletFormController implements Initializa public void configure(Wallet wallet) { boolean validWallet = wallet.isValid(); - boolean whirlpoolMixWallet = wallet.isWhirlpoolMixWallet(); + boolean whirlpoolChildWallet = wallet.isWhirlpoolChildWallet(); for(Toggle toggle : walletMenu.getToggles()) { if(toggle.getUserData().equals(Function.SETTINGS)) { @@ -90,7 +90,7 @@ public class WalletController extends WalletFormController implements Initializa toggle.setSelected(true); } - ((ToggleButton)toggle).setDisable(!validWallet || (whirlpoolMixWallet && toggle.getUserData().equals(Function.RECEIVE))); + ((ToggleButton)toggle).setDisable(!validWallet || (whirlpoolChildWallet && toggle.getUserData().equals(Function.RECEIVE))); } } }