main: fix local node status check on closing uninitialized wallet

This commit is contained in:
xiphon 2020-05-04 14:48:56 +00:00
parent ce6cc47afe
commit c439d6814b

View file

@ -1951,15 +1951,27 @@ ApplicationWindow {
} }
// If daemon is running - prompt user before exiting // If daemon is running - prompt user before exiting
if(typeof daemonManager != "undefined" && daemonRunning) { if(daemonManager == undefined || persistentSettings.useRemoteNode) {
if (appWindow.walletMode == 0) { closeAccepted();
} else if (appWindow.walletMode == 0) {
stopDaemon(closeAccepted); stopDaemon(closeAccepted);
} else { } else {
showProcessingSplash(qsTr("Checking local node status..."));
const handler = function(running) {
hideProcessingSplash();
if (running) {
showDaemonIsRunningDialog(closeAccepted); showDaemonIsRunningDialog(closeAccepted);
}
} else { } else {
closeAccepted(); closeAccepted();
} }
};
if (currentWallet) {
handler(!currentWallet.disconnected);
} else {
daemonManager.runningAsync(persistentSettings.nettype, handler);
}
}
} }
function closeAccepted(){ function closeAccepted(){