diff --git a/src/app_service/service/wallet_connect/async_tasks.nim b/src/app_service/service/wallet_connect/async_tasks.nim deleted file mode 100644 index 661a54e173..0000000000 --- a/src/app_service/service/wallet_connect/async_tasks.nim +++ /dev/null @@ -1,3 +0,0 @@ -################################################# -# Async -################################################# diff --git a/src/backend/wallet_connect.nim b/src/backend/wallet_connect.nim deleted file mode 100644 index 56966c4776..0000000000 --- a/src/backend/wallet_connect.nim +++ /dev/null @@ -1,2 +0,0 @@ -import json -import core, response_type diff --git a/storybook/qmlTests/tests/tst_ConnectedDappsButton.qml b/storybook/qmlTests/tests/tst_ConnectedDappsButton.qml index e524892a9d..cc44a67e90 100644 --- a/storybook/qmlTests/tests/tst_ConnectedDappsButton.qml +++ b/storybook/qmlTests/tests/tst_ConnectedDappsButton.qml @@ -1,6 +1,8 @@ import QtQuick 2.15 import QtTest 1.15 +import StatusQ 0.1 // See #10218 + import QtQuick.Controls 2.15 import Storybook 1.0 @@ -15,7 +17,6 @@ Item { Component { id: componentUnderTest ConnectedDappsButton { - id: control } } diff --git a/storybook/stubs/nim/WalletConnectController.qml b/storybook/stubs/nim/WalletConnectController.qml deleted file mode 100644 index c605274941..0000000000 --- a/storybook/stubs/nim/WalletConnectController.qml +++ /dev/null @@ -1,27 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 - -// Stub for Controller QObject defined in src/app/modules/main/wallet_section/wallet_connect/controller.nim -Item { - id: root - - - // function sessionProposal(/*string*/ sessionProposalJson) - required property var sessionProposal - // function pairSessionRequest(/*string*/ sessionRequestJson) - required property var recordSuccessfulPairing - // function deletePairing(/*string*/ topic) - required property var deletePairing - - signal respondSessionProposal(string sessionProposalJson, string supportedNamespacesJson, string error) - signal respondSessionRequest(string sessionRequestJson, string signedJson, bool error) - signal requestOpenWalletConnectPopup(string uri) - signal respondAuthRequest(string signature, string error) - - // function sessionRequest(/*string*/ sessionRequestJson, /*string*/ password) - required property var sessionRequest - - required property bool hasActivePairings - required property string projectId -} \ No newline at end of file diff --git a/storybook/stubs/nim/qmldir b/storybook/stubs/nim/qmldir deleted file mode 100644 index 2981d63a0f..0000000000 --- a/storybook/stubs/nim/qmldir +++ /dev/null @@ -1 +0,0 @@ -WalletConnectController 1.0 WalletConnectController.qml \ No newline at end of file diff --git a/ui/app/AppLayouts/Profile/ProfileLayout.qml b/ui/app/AppLayouts/Profile/ProfileLayout.qml index 7a6f196121..37c6ba98fe 100644 --- a/ui/app/AppLayouts/Profile/ProfileLayout.qml +++ b/ui/app/AppLayouts/Profile/ProfileLayout.qml @@ -65,9 +65,6 @@ StatusSectionLayout { case Constants.settingsSubsection.keycard: keycardView.item.handleBackAction() break; - case Constants.settingsSubsection.dapps: - dappsView.item.handleBackAction() - break; } Global.settingsSubSubsection = -1 } @@ -133,8 +130,6 @@ StatusSectionLayout { walletView.item.resetStack() } else if (currentIndex === Constants.settingsSubsection.keycard) { keycardView.item.handleBackAction() - } else if (currentIndex === Constants.settingsSubsection.dapps) { - dappsView.item.handleBackAction() } } @@ -262,21 +257,6 @@ StatusSectionLayout { onLoaded: root.store.backButtonName = "" } - Loader { - id: dappsView - active: false - asynchronous: true - sourceComponent: DappsView { - implicitWidth: parent.width - implicitHeight: parent.height - profileSectionStore: root.store - sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.dapps) - mainSectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.dapps) - contentWidth: d.contentWidth - } - onLoaded: root.store.backButtonName = "" - } - Loader { active: false asynchronous: true diff --git a/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml b/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml index f5961083cd..73af073b35 100644 --- a/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml +++ b/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml @@ -122,9 +122,6 @@ QtObject { append({subsection: Constants.settingsSubsection.wallet, text: qsTr("Wallet"), icon: "wallet"}) - append({subsection: Constants.settingsSubsection.dapps, - text: qsTr("dApps"), - icon: "dapp"}) append({subsection: Constants.settingsSubsection.browserSettings, text: qsTr("Browser"), icon: "browser"}) diff --git a/ui/app/AppLayouts/Profile/views/DappsView.qml b/ui/app/AppLayouts/Profile/views/DappsView.qml deleted file mode 100644 index e058c3d98f..0000000000 --- a/ui/app/AppLayouts/Profile/views/DappsView.qml +++ /dev/null @@ -1,88 +0,0 @@ -import QtQuick 2.14 -import QtQuick.Controls 2.14 -import QtQuick.Layouts 1.14 -import QtQml.Models 2.14 - -import StatusQ.Core 0.1 -import StatusQ.Controls 0.1 -import StatusQ.Core.Theme 0.1 - -import utils 1.0 - -import "../stores" -import "./dapps" - -SettingsContentBase { - id: root - - required property ProfileSectionStore profileSectionStore - required property string mainSectionTitle - - titleRowComponentLoader.sourceComponent: stackLayout.currentIndex === d.mainViewIndex || - stackLayout.currentIndex === d.connectedDappsIndex? - d.headerButton : undefined - - function handleBackAction() { - if (stackLayout.currentIndex !== d.mainViewIndex) { - root.profileSectionStore.backButtonName = "" - root.sectionTitle = root.mainSectionTitle - stackLayout.currentIndex = d.mainViewIndex - } - } - - StackLayout { - id: stackLayout - - currentIndex: d.mainViewIndex - - QtObject { - id: d - - readonly property int mainViewIndex: 0 - readonly property int connectedDappsIndex: 1 - readonly property int approvalsIndex: 2 - readonly property int trustLevelsIndex: 3 - readonly property int securityIndex: 4 - - function changeSubsection(title, index) { - root.profileSectionStore.backButtonName = root.mainSectionTitle - root.sectionTitle = title - stackLayout.currentIndex = index - } - - property Component headerButton: Component { - StatusButton { - text: qsTr("Connect a dApp via WalletConnect") - onClicked: { - console.warn("TODO: run wallet connect popup...") - } - } - } - } - - Main { - Layout.preferredWidth: root.contentWidth - - onDisplayConnectedDapps: d.changeSubsection(title, d.connectedDappsIndex) - onDisplayApprovals: d.changeSubsection(title, d.approvalsIndex) - onDisplayTrustLevels: d.changeSubsection(title, d.trustLevelsIndex) - onDisplaySecurity: d.changeSubsection(title, d.securityIndex) - } - - ConnectedDapps { - Layout.preferredWidth: root.contentWidth - } - - Approvals { - Layout.preferredWidth: root.contentWidth - } - - TrustLevels { - Layout.preferredWidth: root.contentWidth - } - - Security { - Layout.preferredWidth: root.contentWidth - } - } -} diff --git a/ui/app/AppLayouts/Profile/views/dapps/Approvals.qml b/ui/app/AppLayouts/Profile/views/dapps/Approvals.qml deleted file mode 100644 index d5434f9abe..0000000000 --- a/ui/app/AppLayouts/Profile/views/dapps/Approvals.qml +++ /dev/null @@ -1,44 +0,0 @@ -import QtQuick 2.14 -import QtQuick.Layouts 1.14 - -import StatusQ.Controls 0.1 - -import utils 1.0 -import shared.controls 1.0 - -ColumnLayout { - id: root - - spacing: Constants.settingsSection.itemSpacing - - QtObject { - id: d - } - - StatusTabBar { - id: walletTabBar - Layout.fillWidth: true - - StatusTabButton { - leftPadding: 0 - width: implicitWidth - text: qsTr("By dApp") - } - - StatusTabButton { - width: implicitWidth - text: qsTr("By token") - } - - StatusTabButton { - width: implicitWidth - text: qsTr("By account") - } - } - - ShapeRectangle { - Layout.fillWidth: true - Layout.preferredHeight: implicitHeight - text: qsTr("Your dApp approvals will appear here") - } -} diff --git a/ui/app/AppLayouts/Profile/views/dapps/ConnectedDapps.qml b/ui/app/AppLayouts/Profile/views/dapps/ConnectedDapps.qml deleted file mode 100644 index a7fca1415d..0000000000 --- a/ui/app/AppLayouts/Profile/views/dapps/ConnectedDapps.qml +++ /dev/null @@ -1,39 +0,0 @@ -import QtQuick 2.14 -import QtQuick.Layouts 1.14 - -import StatusQ.Controls 0.1 - -import utils 1.0 -import shared.controls 1.0 - -ColumnLayout { - id: root - - spacing: Constants.settingsSection.itemSpacing - - QtObject { - id: d - } - - StatusTabBar { - id: walletTabBar - Layout.fillWidth: true - - StatusTabButton { - leftPadding: 0 - width: implicitWidth - text: qsTr("By dApp") - } - - StatusTabButton { - width: implicitWidth - text: qsTr("By account") - } - } - - ShapeRectangle { - Layout.fillWidth: true - Layout.preferredHeight: implicitHeight - text: qsTr("Your connected dApps will appear here") - } -} diff --git a/ui/app/AppLayouts/Profile/views/dapps/Main.qml b/ui/app/AppLayouts/Profile/views/dapps/Main.qml deleted file mode 100644 index c9c9388dcf..0000000000 --- a/ui/app/AppLayouts/Profile/views/dapps/Main.qml +++ /dev/null @@ -1,79 +0,0 @@ -import QtQuick 2.14 -import QtQuick.Layouts 1.14 - -import StatusQ.Core 0.1 -import StatusQ.Core.Theme 0.1 -import StatusQ.Components 0.1 - -import utils 1.0 - -ColumnLayout { - id: root - - signal displayConnectedDapps(string title) - signal displayApprovals(string title) - signal displayTrustLevels(string title) - signal displaySecurity(string title) - - spacing: Constants.settingsSection.itemSpacing - - QtObject { - id: d - } - - StatusListItem { - Layout.fillWidth: true - title: qsTr("Connected") - components: [ - StatusIcon { - icon: "next" - color: Theme.palette.baseColor1 - } - ] - onClicked: { - root.displayConnectedDapps(title) - } - } - - StatusListItem { - Layout.fillWidth: true - title: qsTr("Approvals") - components: [ - StatusIcon { - icon: "next" - color: Theme.palette.baseColor1 - } - ] - onClicked: { - root.displayApprovals(title) - } - } - - StatusListItem { - Layout.fillWidth: true - title: qsTr("Trust levels") - components: [ - StatusIcon { - icon: "next" - color: Theme.palette.baseColor1 - } - ] - onClicked: { - root.displayTrustLevels(title) - } - } - - StatusListItem { - Layout.fillWidth: true - title: qsTr("Security") - components: [ - StatusIcon { - icon: "next" - color: Theme.palette.baseColor1 - } - ] - onClicked: { - root.displaySecurity(title) - } - } -} diff --git a/ui/app/AppLayouts/Profile/views/dapps/Security.qml b/ui/app/AppLayouts/Profile/views/dapps/Security.qml deleted file mode 100644 index 8d650ee7e4..0000000000 --- a/ui/app/AppLayouts/Profile/views/dapps/Security.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.14 -import QtQuick.Layouts 1.14 - -import utils 1.0 - -ColumnLayout { - id: root - - spacing: Constants.settingsSection.itemSpacing - - QtObject { - id: d - } -} diff --git a/ui/app/AppLayouts/Profile/views/dapps/TrustLevels.qml b/ui/app/AppLayouts/Profile/views/dapps/TrustLevels.qml deleted file mode 100644 index bf9435f651..0000000000 --- a/ui/app/AppLayouts/Profile/views/dapps/TrustLevels.qml +++ /dev/null @@ -1,23 +0,0 @@ -import QtQuick 2.14 -import QtQuick.Layouts 1.14 - -import StatusQ.Controls 0.1 - -import utils 1.0 -import shared.controls 1.0 - -ColumnLayout { - id: root - - spacing: Constants.settingsSection.itemSpacing - - QtObject { - id: d - } - - ShapeRectangle { - Layout.fillWidth: true - Layout.preferredHeight: implicitHeight - text: qsTr("Your trust level for dApps you have interacted with will appear here") - } -} diff --git a/ui/imports/utils/Constants.qml b/ui/imports/utils/Constants.qml index c0e17b1cc5..32baf602da 100644 --- a/ui/imports/utils/Constants.qml +++ b/ui/imports/utils/Constants.qml @@ -337,22 +337,21 @@ QtObject { readonly property int ensUsernames: 3 readonly property int messaging: 4 readonly property int wallet:5 - readonly property int dapps: 6 - readonly property int appearance: 7 - readonly property int language: 8 - readonly property int notifications: 9 - readonly property int syncingSettings: 10 - readonly property int browserSettings: 11 - readonly property int advanced: 12 - readonly property int about: 13 - readonly property int communitiesSettings: 14 - readonly property int keycard: 15 - readonly property int about_terms: 16 // a subpage under "About" - readonly property int about_privacy: 17 // a subpage under "About" + readonly property int appearance: 6 + readonly property int language: 7 + readonly property int notifications: 8 + readonly property int syncingSettings: 9 + readonly property int browserSettings: 10 + readonly property int advanced: 11 + readonly property int about: 12 + readonly property int communitiesSettings: 13 + readonly property int keycard: 14 + readonly property int about_terms: 15 // a subpage under "About" + readonly property int about_privacy: 16 // a subpage under "About" // special treatment; these do not participate in the main settings' StackLayout - readonly property int signout: 18 - readonly property int backUpSeed: 19 + readonly property int signout: 17 + readonly property int backUpSeed: 18 } readonly property QtObject walletSettingsSubsection: QtObject {