From 6bc96270469294d6ddfedf16ff166c49079491be Mon Sep 17 00:00:00 2001 From: xiphon Date: Sat, 3 Apr 2021 10:45:02 +0000 Subject: SettingsNode: implement multiple remote nodes support --- wizard/WizardDaemonSettings.qml | 10 ++++++++-- wizard/WizardSummary.qml | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'wizard') diff --git a/wizard/WizardDaemonSettings.qml b/wizard/WizardDaemonSettings.qml index 3f1f2204..bd54f7e1 100644 --- a/wizard/WizardDaemonSettings.qml +++ b/wizard/WizardDaemonSettings.qml @@ -42,7 +42,13 @@ ColumnLayout { function save(){ persistentSettings.useRemoteNode = remoteNode.checked - persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress(); + const index = remoteNodesModel.appendIfNotExists({ + address: remoteNodeEdit.getAddress(), + username: "", + password: "", + trusted: false, + }); + remoteNodesModel.applyRemoteNode(index); if (bootstrapNodeEdit.daemonAddrText == "auto") { persistentSettings.bootstrapNodeAddress = "auto"; } else { @@ -179,7 +185,7 @@ ColumnLayout { id: remoteNodeEdit Layout.fillWidth: true - initialAddress: persistentSettings.remoteNodeAddress + initialAddress: remoteNodesModel.currentRemoteNode().address } } } diff --git a/wizard/WizardSummary.qml b/wizard/WizardSummary.qml index 840ee971..de3c60ec 100644 --- a/wizard/WizardSummary.qml +++ b/wizard/WizardSummary.qml @@ -65,10 +65,10 @@ ColumnLayout { } WizardSummaryItem { - visible: persistentSettings.remoteNodeAddress !== "" && appWindow.walletMode == 0 + visible: remoteNodesModel.currentRemoteNode().address !== "" && appWindow.walletMode == 0 Layout.fillWidth: true header: qsTr("Daemon address") + translationManager.emptyString - value: persistentSettings.remoteNodeAddress + value: remoteNodesModel.currentRemoteNode().address } WizardSummaryItem { -- cgit v1.2.3