diff options
| author | xiphon <xiphon@protonmail.com> | 2019-08-06 15:36:35 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2019-08-07 06:43:18 +0000 |
| commit | 30a3abedbe7c4e26cfc2da7c84c3300dfae2a254 (patch) | |
| tree | 3e7aa258b4f5816d3f27916d87cdc82d1266abbd /main.qml | |
| parent | 0461a2870106928cc40db2d6f39514898c68a292 (diff) | |
| download | monzero-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.qml | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -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); } |
