1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-28 00:23:44 +01:00

Merge pull request #2416

582267a main: apply WalletMode check on start (xiphon)
This commit is contained in:
luigi1111 2019-10-16 14:22:56 -05:00
commit 290582d428
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -1271,6 +1271,9 @@ ApplicationWindow {
Component.onCompleted: {
x = (Screen.width - width) / 2
y = (Screen.height - maxWindowHeight) / 2
applyWalletMode(persistentSettings.walletMode);
//
walletManager.walletOpened.connect(onWalletOpened);
walletManager.deviceButtonRequest.connect(onDeviceButtonRequest);
@ -2054,6 +2057,10 @@ ApplicationWindow {
appWindow.disconnectedEpoch = 0;
appWindow.walletMode = mode;
persistentSettings.walletMode = mode;
applyWalletMode(mode);
}
function applyWalletMode(mode){
if (mode < 2) {
persistentSettings.useRemoteNode = false;
persistentSettings.bootstrapNodeAddress = "auto";
@ -2062,7 +2069,7 @@ ApplicationWindow {
middlePanel.settingsView.settingsStateViewState = "Wallet"
}
}
console.log("walletMode changed: " + (mode === 0 ? "simple": mode === 1 ? "simple (bootstrap)" : "Advanced"));
console.log("walletMode: " + (mode === 0 ? "simple": mode === 1 ? "simple (bootstrap)" : "Advanced"));
}
// Daemon console