diff --git a/drongo b/drongo index 9a9a1b92..e0302cef 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit 9a9a1b925461ee2a8ae7f6885309b0babd4b6767 +Subproject commit e0302cef22a3dd9401f9070318fec5ea15543bd7 diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java index 7942efe9..48261f8a 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppController.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java @@ -912,6 +912,11 @@ public class AppController implements Initializable { whirlpool.setHDWallet(storage.getWalletId(wallet), copy); } + StandardAccount standardAccount = wallet.getStandardAccountType(); + if(standardAccount != null && standardAccount.getMinimumGapLimit() != null && wallet.gapLimit() == null) { + wallet.setGapLimit(standardAccount.getMinimumGapLimit()); + } + for(int i = 0; i < wallet.getKeystores().size(); i++) { Keystore keystore = wallet.getKeystores().get(i); if(keystore.hasSeed()) { diff --git a/src/main/java/com/sparrowwallet/sparrow/control/MixStatusCell.java b/src/main/java/com/sparrowwallet/sparrow/control/MixStatusCell.java index 2ba076c8..b53a3e8f 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/MixStatusCell.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/MixStatusCell.java @@ -66,7 +66,7 @@ public class MixStatusCell extends TreeTableCell { if(mixFailReason != MixFailReason.CANCEL) { setGraphic(getFailGlyph()); Tooltip tt = new Tooltip(); - tt.setText(mixFailReason.getMessage() + (mixError == null ? "" : ": " + mixError)); + tt.setText(mixFailReason.getMessage() + (mixError == null ? "" : ": " + mixError) + "\nMake sure your internet connection is stable and the computer is configured to prevent sleeping."); setTooltip(tt); } else { setGraphic(null); diff --git a/src/main/java/com/sparrowwallet/sparrow/whirlpool/Whirlpool.java b/src/main/java/com/sparrowwallet/sparrow/whirlpool/Whirlpool.java index 7286bccf..7cfb0756 100644 --- a/src/main/java/com/sparrowwallet/sparrow/whirlpool/Whirlpool.java +++ b/src/main/java/com/sparrowwallet/sparrow/whirlpool/Whirlpool.java @@ -77,6 +77,8 @@ public class Whirlpool { private String walletId; private String mixToWalletId; + private StartupService startupService; + private final BooleanProperty startingProperty = new SimpleBooleanProperty(false); private final BooleanProperty stoppingProperty = new SimpleBooleanProperty(false); private final BooleanProperty mixingProperty = new SimpleBooleanProperty(false); @@ -262,6 +264,15 @@ public class Whirlpool { httpClientService.shutdown(); } + public StartupService createStartupService() { + if(startupService != null) { + startupService.cancel(); + } + + startupService = new StartupService(this); + return startupService; + } + private WalletUtxo getUtxo(WhirlpoolUtxo whirlpoolUtxo) { Wallet wallet = AppServices.get().getWallet(walletId); if(wallet != null) { diff --git a/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java b/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java index 937e6602..35286d55 100644 --- a/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java +++ b/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java @@ -29,7 +29,6 @@ public class WhirlpoolServices { private static final Logger log = LoggerFactory.getLogger(WhirlpoolServices.class); private final Map whirlpoolMap = new HashMap<>(); - private Whirlpool.StartupService startupService; public Whirlpool getWhirlpool(Wallet wallet) { Wallet masterWallet = wallet.isMasterWallet() ? wallet : wallet.getMasterWallet(); @@ -88,11 +87,7 @@ public class WhirlpoolServices { } } - if(startupService != null) { - startupService.cancel(); - } - - startupService = new Whirlpool.StartupService(whirlpool); + Whirlpool.StartupService startupService = whirlpool.createStartupService(); startupService.setPeriod(Duration.minutes(2)); startupService.setOnSucceeded(workerStateEvent -> { startupService.cancel();