mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
main: fix local node status check on closing uninitialized wallet
This commit is contained in:
parent
ce6cc47afe
commit
c439d6814b
1 changed files with 19 additions and 7 deletions
26
main.qml
26
main.qml
|
@ -1951,14 +1951,26 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
// If daemon is running - prompt user before exiting
|
||||
if(typeof daemonManager != "undefined" && daemonRunning) {
|
||||
if (appWindow.walletMode == 0) {
|
||||
stopDaemon(closeAccepted);
|
||||
} else {
|
||||
showDaemonIsRunningDialog(closeAccepted);
|
||||
}
|
||||
} else {
|
||||
if(daemonManager == undefined || persistentSettings.useRemoteNode) {
|
||||
closeAccepted();
|
||||
} else if (appWindow.walletMode == 0) {
|
||||
stopDaemon(closeAccepted);
|
||||
} else {
|
||||
showProcessingSplash(qsTr("Checking local node status..."));
|
||||
const handler = function(running) {
|
||||
hideProcessingSplash();
|
||||
if (running) {
|
||||
showDaemonIsRunningDialog(closeAccepted);
|
||||
} else {
|
||||
closeAccepted();
|
||||
}
|
||||
};
|
||||
|
||||
if (currentWallet) {
|
||||
handler(!currentWallet.disconnected);
|
||||
} else {
|
||||
daemonManager.runningAsync(persistentSettings.nettype, handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue