mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
initialize wallet after p2p network ready
This commit is contained in:
parent
e369487457
commit
cf8de0843e
@ -420,13 +420,6 @@ public class HavenoSetup {
|
|||||||
havenoSetupListeners.forEach(HavenoSetupListener::onInitP2pNetwork);
|
havenoSetupListeners.forEach(HavenoSetupListener::onInitP2pNetwork);
|
||||||
p2pNetworkReady = p2PNetworkSetup.init(this::initWallet, displayTorNetworkSettingsHandler);
|
p2pNetworkReady = p2PNetworkSetup.init(this::initWallet, displayTorNetworkSettingsHandler);
|
||||||
|
|
||||||
// We only init wallet service here if not using Tor for bitcoinj.
|
|
||||||
// When using Tor, wallet init must be deferred until Tor is ready.
|
|
||||||
// TODO encapsulate below conditional inside getUseTorForBitcoinJ
|
|
||||||
if (!preferences.getUseTorForBitcoinJ() || localBitcoinNode.shouldBeUsed()) {
|
|
||||||
initWallet();
|
|
||||||
}
|
|
||||||
|
|
||||||
// need to store it to not get garbage collected
|
// need to store it to not get garbage collected
|
||||||
p2pNetworkAndWalletInitialized = EasyBind.combine(walletInitialized, p2pNetworkReady,
|
p2pNetworkAndWalletInitialized = EasyBind.combine(walletInitialized, p2pNetworkReady,
|
||||||
(a, b) -> {
|
(a, b) -> {
|
||||||
|
@ -146,7 +146,7 @@ public class P2PNetworkSetup {
|
|||||||
bootstrapState.set(Res.get("mainView.bootstrapState.torNodeCreated"));
|
bootstrapState.set(Res.get("mainView.bootstrapState.torNodeCreated"));
|
||||||
p2PNetworkIconId.set("image-connection-tor");
|
p2PNetworkIconId.set("image-connection-tor");
|
||||||
|
|
||||||
if (preferences.getUseTorForBitcoinJ())
|
// invoke handler to initialize wallet
|
||||||
initWalletServiceHandler.run();
|
initWalletServiceHandler.run();
|
||||||
|
|
||||||
// We want to get early connected to the price relay so we call it already now
|
// We want to get early connected to the price relay so we call it already now
|
||||||
|
Loading…
Reference in New Issue
Block a user