From a5e534ac16c4c50de423e4f7cffdd04f66fa14ab Mon Sep 17 00:00:00 2001 From: Alex Jbanca Date: Mon, 5 Aug 2024 12:24:48 +0300 Subject: [PATCH] fix: Remove possibility to add watch accounts on release --- .../Wallet/views/AccountContextMenu.qml | 20 ++++++++++++------- .../shared/popups/addaccount/states/Main.qml | 1 + 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ui/app/AppLayouts/Wallet/views/AccountContextMenu.qml b/ui/app/AppLayouts/Wallet/views/AccountContextMenu.qml index 9ce1500fde..c2b3f48c91 100644 --- a/ui/app/AppLayouts/Wallet/views/AccountContextMenu.qml +++ b/ui/app/AppLayouts/Wallet/views/AccountContextMenu.qml @@ -74,13 +74,19 @@ StatusMenu { } } - StatusAction { - objectName: "AccountMenu-AddWatchOnlyAccountAction-%1".arg(root.uniqueIdentifier) - text: qsTr("Add watched address") - enabled: !root.account - icon.name: "show" - onTriggered: { - root.addWatchOnlyAccountClicked() + Loader { + active: !production + sourceComponent: StatusAction { + objectName: "AccountMenu-AddWatchOnlyAccountAction-%1".arg(root.uniqueIdentifier) + text: qsTr("Add watched address") + enabled: !root.account + icon.name: "show" + onTriggered: { + root.addWatchOnlyAccountClicked() + } + } + onLoaded: { + root.addAction(item) } } } diff --git a/ui/imports/shared/popups/addaccount/states/Main.qml b/ui/imports/shared/popups/addaccount/states/Main.qml index c736db2990..e58c1d4c86 100644 --- a/ui/imports/shared/popups/addaccount/states/Main.qml +++ b/ui/imports/shared/popups/addaccount/states/Main.qml @@ -59,6 +59,7 @@ Item { readonly property string addWatchOnlyAccKeyUid: Constants.appTranslatableConstants.addAccountLabelOptionAddWatchOnlyAcc filters: [ FastExpressionFilter { + enabled: production expression: model.keyPair.keyUid !== originModelWithoutWatchOnlyAcc.addWatchOnlyAccKeyUid expectedRoles: ["keyPair"] }