mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-17 00:07:49 +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() {
|
||||
return walletInitialized;
|
||||
}
|
||||
|
||||
public AppStartupState getAppStartupState() {
|
||||
return appStartupState;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,7 +88,6 @@ import org.bitcoinj.core.Coin;
|
|||
import org.bouncycastle.crypto.params.KeyParameter;
|
||||
import org.fxmisc.easybind.EasyBind;
|
||||
import org.fxmisc.easybind.Subscription;
|
||||
import org.fxmisc.easybind.monadic.MonadicBinding;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -450,9 +449,13 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
|||
|
||||
// process after all wallets initialized
|
||||
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) -> {
|
||||
if (!newValue) return;
|
||||
|
||||
// TODO: this subscription fails to fire about 50% on startup
|
||||
// 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
|
||||
thawUnreservedOutputs();
|
||||
|
|
Loading…
Reference in a new issue