mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
dont allow receiving on badbank wallet, introduce skipInstaller flag in build
This commit is contained in:
parent
44b9cee825
commit
aaca9ffa16
7 changed files with 14 additions and 8 deletions
|
@ -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) {
|
||||
|
|
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit 0b40c20ab252e29ac192bca34d834b8c3eed04a0
|
||||
Subproject commit 38783d68a49ecf5d8c8640edb299d693f455b2a9
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> {
|
|||
|
||||
setGraphic(actionBox);
|
||||
|
||||
if(nodeEntry.getWallet().isWhirlpoolMixWallet()) {
|
||||
if(nodeEntry.getWallet().isWhirlpoolChildWallet()) {
|
||||
setText(address.toString().substring(0, 20) + "...");
|
||||
setContextMenu(null);
|
||||
setGraphic(new HBox());
|
||||
|
|
|
@ -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<Entry> optLabelEntry = getWalletForm().getNodeEntry(keyPurpose).getChildren().stream()
|
||||
.filter(entry -> ((NodeEntry)entry).getNode().getIndex() == indexNode.getIndex()).findFirst();
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue