Only prompt for daemon auto start when daemon address is local

This commit is contained in:
Jaquee 2017-09-04 13:42:46 +02:00
parent d0f3194574
commit 86e9f3811b
2 changed files with 11 additions and 11 deletions

View file

@ -302,7 +302,7 @@ ApplicationWindow {
middlePanel.transferView.updatePriorityDropdown();
// If wallet isnt connected and no daemon is running - Ask
if(!walletInitialized && status === Wallet.ConnectionStatus_Disconnected && !daemonManager.running(persistentSettings.testnet)){
if(isDaemonLocal() && !walletInitialized && status === Wallet.ConnectionStatus_Disconnected && !daemonManager.running(persistentSettings.testnet)){
daemonManagerDialog.open();
}
// initialize transaction history once wallet is initialized first time;
@ -1376,4 +1376,14 @@ ApplicationWindow {
onTriggered: checkUpdates()
}
function isDaemonLocal() {
var daemonAddress = appWindow.persistentSettings.daemon_address
if (daemonAddress === "")
return false
var daemonHost = daemonAddress.split(":")[0]
if (daemonHost === "127.0.0.1" || daemonHost === "localhost")
return true
return false
}
}

View file

@ -37,16 +37,6 @@ Rectangle {
color: "#F0EEEE"
property var currentHashRate: 0
function isDaemonLocal() {
var daemonAddress = appWindow.persistentSettings.daemon_address
if (daemonAddress === "")
return false
var daemonHost = daemonAddress.split(":")[0]
if (daemonHost === "127.0.0.1" || daemonHost === "localhost")
return true
return false
}
/* main layout */
ColumnLayout {
id: mainLayout