aboutsummaryrefslogtreecommitdiff
path: root/main.qml
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2019-08-06 15:36:35 +0000
committerxiphon <xiphon@protonmail.com>2019-08-07 06:43:18 +0000
commit30a3abedbe7c4e26cfc2da7c84c3300dfae2a254 (patch)
tree3e7aa258b4f5816d3f27916d87cdc82d1266abbd /main.qml
parent0461a2870106928cc40db2d6f39514898c68a292 (diff)
downloadmonzero-gui-30a3abedbe7c4e26cfc2da7c84c3300dfae2a254.tar.gz
monzero-gui-30a3abedbe7c4e26cfc2da7c84c3300dfae2a254.tar.xz
monzero-gui-30a3abedbe7c4e26cfc2da7c84c3300dfae2a254.zip
Wallet: explicitly set trusted daemon flag
Diffstat (limited to 'main.qml')
-rw-r--r--main.qml16
1 files changed, 13 insertions, 3 deletions
diff --git a/main.qml b/main.qml
index 48fde1a9..be8bf25f 100644
--- a/main.qml
+++ b/main.qml
@@ -385,11 +385,21 @@ ApplicationWindow {
currentDaemonAddress = localDaemonAddress
console.log("initializing with daemon address: ", currentDaemonAddress)
- currentWallet.initAsync(currentDaemonAddress, 0, persistentSettings.is_recovering, persistentSettings.is_recovering_from_device, persistentSettings.restore_height);
+ currentWallet.initAsync(
+ currentDaemonAddress,
+ isTrustedDaemon(),
+ 0,
+ persistentSettings.is_recovering,
+ persistentSettings.is_recovering_from_device,
+ persistentSettings.restore_height);
// save wallet keys in case wallet settings have been changed in the init
currentWallet.setPassword(walletPassword);
}
+ function isTrustedDaemon() {
+ return !persistentSettings.useRemoteNode || persistentSettings.is_trusted_daemon;
+ }
+
function walletPath() {
var wallet_path = persistentSettings.wallet_path
return wallet_path;
@@ -604,7 +614,7 @@ ApplicationWindow {
console.log("connecting remote node");
persistentSettings.useRemoteNode = true;
currentDaemonAddress = persistentSettings.remoteNodeAddress;
- currentWallet.initAsync(currentDaemonAddress);
+ currentWallet.initAsync(currentDaemonAddress, isTrustedDaemon());
walletManager.setDaemonAddressAsync(currentDaemonAddress);
}
@@ -615,7 +625,7 @@ ApplicationWindow {
console.log("disconnecting remote node");
persistentSettings.useRemoteNode = false;
currentDaemonAddress = localDaemonAddress
- currentWallet.initAsync(currentDaemonAddress);
+ currentWallet.initAsync(currentDaemonAddress, isTrustedDaemon());
walletManager.setDaemonAddressAsync(currentDaemonAddress);
}