mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-17 08:17:57 +00:00
swap address entries when app fully initialized
This commit is contained in:
parent
2ca8ccb1f3
commit
0bbb8a4183
2 changed files with 13 additions and 6 deletions
|
@ -779,4 +779,8 @@ public class HavenoSetup {
|
||||||
public BooleanProperty getWalletInitialized() {
|
public BooleanProperty getWalletInitialized() {
|
||||||
return walletInitialized;
|
return walletInitialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AppStartupState getAppStartupState() {
|
||||||
|
return appStartupState;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,6 @@ import org.bitcoinj.core.Coin;
|
||||||
import org.bouncycastle.crypto.params.KeyParameter;
|
import org.bouncycastle.crypto.params.KeyParameter;
|
||||||
import org.fxmisc.easybind.EasyBind;
|
import org.fxmisc.easybind.EasyBind;
|
||||||
import org.fxmisc.easybind.Subscription;
|
import org.fxmisc.easybind.Subscription;
|
||||||
import org.fxmisc.easybind.monadic.MonadicBinding;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -450,9 +449,13 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
||||||
|
|
||||||
// process after all wallets initialized
|
// process after all wallets initialized
|
||||||
if (HavenoUtils.havenoSetup != null) { // null for seednode
|
if (HavenoUtils.havenoSetup != null) { // null for seednode
|
||||||
MonadicBinding<Boolean> walletsInitialized = EasyBind.combine(HavenoUtils.havenoSetup.getWalletInitialized(), persistedTradesInitialized, (a, b) -> a && b);
|
|
||||||
walletsInitialized.subscribe((observable, oldValue, newValue) -> {
|
// TODO: this subscription fails to fire about 50% on startup
|
||||||
if (!newValue) return;
|
// MonadicBinding<Boolean> walletsInitialized = EasyBind.combine(HavenoUtils.havenoSetup.getWalletInitialized(), persistedTradesInitialized, (a, b) -> a && b);
|
||||||
|
// walletsInitialized.subscribe((observable, oldValue, newValue) -> {}
|
||||||
|
|
||||||
|
EasyBind.subscribe(HavenoUtils.havenoSetup.getAppStartupState().applicationFullyInitializedProperty(), appInitialized -> {
|
||||||
|
if (!appInitialized) return;
|
||||||
|
|
||||||
// thaw unreserved outputs
|
// thaw unreserved outputs
|
||||||
thawUnreservedOutputs();
|
thawUnreservedOutputs();
|
||||||
|
|
Loading…
Reference in a new issue