fix(Airdrop): Update owner and tmaster tokens visualization in airdrop's list

Added filter in collectibles airdrop's list:
- TMaster token will be shown ONLY if user is the community owner.
- Owner token is always hidden.

Fixes #12089
This commit is contained in:
Noelia 2023-09-07 18:11:09 +02:00 committed by Noelia
parent 440e61d7a8
commit b3c74de234
1 changed files with 14 additions and 4 deletions

View File

@ -481,10 +481,20 @@ StatusSectionLayout {
sourceComponent: SortFilterProxyModel {
sourceModel: airdropPanel.communityTokens
filters: ValueFilter {
roleName: "tokenType"
value: Constants.TokenType.ERC721
}
filters: [
ValueFilter {
roleName: "tokenType"
value: Constants.TokenType.ERC721
},
ExpressionFilter {
function getPrivileges(privilegesLevel) {
return privilegesLevel === Constants.TokenPrivilegesLevel.Community ||
(root.isOwner && privilegesLevel === Constants.TokenPrivilegesLevel.TMaster)
}
expression: { return getPrivileges(model.privilegesLevel) }
}
]
proxyRoles: [
ExpressionRole {
name: "category"