mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-07 14:37:26 -04:00
Wallet: explicitly set trusted daemon flag
This commit is contained in:
16
main.qml
16
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user