fix(wallet): Disable adding new watch-only accounts (#15970)
closes: #15933 Co-authored-by: belalshehab <belal@status.im>
This commit is contained in:
parent
deff78ca86
commit
29a776114e
|
@ -9,6 +9,8 @@ import StatusQ.Controls 0.1
|
|||
import StatusQ.Controls.Validators 0.1
|
||||
|
||||
import utils 1.0
|
||||
import StatusQ 0.1
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import "../stores"
|
||||
import "../panels"
|
||||
|
@ -49,6 +51,20 @@ Item {
|
|||
id: d
|
||||
readonly property bool isEdit: root.store.editMode
|
||||
|
||||
readonly property SortFilterProxyModel originModelWithoutWatchOnlyAcc: SortFilterProxyModel {
|
||||
id: originModelWithoutWatchOnlyAcc
|
||||
objectName: "originModelWithoutWatchOnlyAcc"
|
||||
sourceModel: root.store.originModel
|
||||
|
||||
readonly property string addWatchOnlyAccKeyUid: Constants.appTranslatableConstants.addAccountLabelOptionAddWatchOnlyAcc
|
||||
filters: [
|
||||
FastExpressionFilter {
|
||||
expression: model.keyPair.keyUid !== originModelWithoutWatchOnlyAcc.addWatchOnlyAccKeyUid
|
||||
expectedRoles: ["keyPair"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
function openEmojiPopup(showLeft) {
|
||||
if (!root.store.emojiPopup) {
|
||||
return
|
||||
|
@ -171,7 +187,7 @@ Item {
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
userProfilePublicKey: root.store.userProfilePublicKey
|
||||
originModel: root.store.editMode? [] : root.store.originModel
|
||||
originModel: root.store.editMode? [] : d.originModelWithoutWatchOnlyAcc
|
||||
selectedOrigin: root.store.selectedOrigin
|
||||
caretVisible: !root.store.editMode
|
||||
enabled: !root.store.editMode
|
||||
|
|
Loading…
Reference in New Issue