From 8d335ab210e3c17fde11bab50f8d26c388526214 Mon Sep 17 00:00:00 2001 From: Alex Jbanca Date: Mon, 24 Jul 2023 12:14:25 +0300 Subject: [PATCH] feat(ExportControlNode): Connect Export Control Node popup to backend Connect `onDeletePrivateKey` to backend. Depends on https://github.com/status-im/status-desktop/pull/11640 --- ui/app/AppLayouts/Chat/stores/RootStore.qml | 4 ++++ .../AppLayouts/Communities/views/CommunitySettingsView.qml | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/app/AppLayouts/Chat/stores/RootStore.qml b/ui/app/AppLayouts/Chat/stores/RootStore.qml index 742d5639b1..4090de1f19 100644 --- a/ui/app/AppLayouts/Chat/stores/RootStore.qml +++ b/ui/app/AppLayouts/Chat/stores/RootStore.qml @@ -620,6 +620,10 @@ QtObject { chatCommunitySectionModule.authenticateWithCallback() } + function removePrivateKey(communityId) { + root.communitiesModuleInst.removePrivateKey(communityId) + } + readonly property Connections communitiesModuleConnections: Connections { target: communitiesModuleInst function onImportingCommunityStateChanged(communityId, state, errorMsg) { diff --git a/ui/app/AppLayouts/Communities/views/CommunitySettingsView.qml b/ui/app/AppLayouts/Communities/views/CommunitySettingsView.qml index 51f8f8d40d..bf4ccf65be 100644 --- a/ui/app/AppLayouts/Communities/views/CommunitySettingsView.qml +++ b/ui/app/AppLayouts/Communities/views/CommunitySettingsView.qml @@ -214,11 +214,9 @@ StatusSectionLayout { return Global.openExportControlNodePopup(root.community.name, root.chatCommunitySectionModule.exportCommunity(root.community.id), (popup) => { - //TODO: connect to backend - // Delete private key and remove control node status popup.onDeletePrivateKey.connect(() => { - console.log("Delete private key") - }) + root.rootStore.removePrivateKey(root.community.id) + }) }) }) }