From c82a4ba602876983eccb61f42f59fad4d3e46329 Mon Sep 17 00:00:00 2001 From: Dario Gabriel Lipicar Date: Wed, 17 Jan 2024 23:13:02 -0300 Subject: [PATCH] feat(@desktop/wallet): add collectibles filter option collectibleIDs Closes #13215 --- src/backend/collectibles.nim | 7 +++++++ vendor/status-go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/backend/collectibles.nim b/src/backend/collectibles.nim index 3a6a796e5e..5e77f19823 100644 --- a/src/backend/collectibles.nim +++ b/src/backend/collectibles.nim @@ -75,6 +75,7 @@ type # see status-go/services/wallet/collectibles/filter.go Filter # All empty sequences mean include all CollectibleFilter* = object + collectibleIds*: seq[CollectibleUniqueID] communityIds*: seq[string] communityPrivilegesLevels*: seq[int] filterCommunity*: FilterCommunityType @@ -131,6 +132,9 @@ proc fromJson*(t: JsonNode, T: typedesc[OwnershipUpdateMessage]): OwnershipUpdat ) # CollectibleFilter +proc newCollectibleFilterAllCollectibleIds*(): seq[CollectibleUniqueID] {.inline.} = + return @[] + proc newCollectibleFilterAllCommunityIds*(): seq[string] {.inline.} = return @[] @@ -139,6 +143,7 @@ proc newCollectibleFilterAllCommunityPrivilegesLevels*(): seq[int] {.inline.} = proc newCollectibleFilterAllEntries*(): CollectibleFilter {.inline.} = return CollectibleFilter( + collectibleIds: newCollectibleFilterAllCollectibleIds(), communityIds: newCollectibleFilterAllCommunityIds(), communityPrivilegesLevels: newCollectibleFilterAllCommunityPrivilegesLevels(), filterCommunity: FilterCommunityType.All @@ -146,6 +151,7 @@ proc newCollectibleFilterAllEntries*(): CollectibleFilter {.inline.} = proc `$`*(self: CollectibleFilter): string = return fmt"""CollectibleFilter( + collectibleIds:{self.collectibleIds}, communityIds:{self.communityIds}, communityPrivilegesLevels:{self.communityPrivilegesLevels}, filterCommunity:{self.filterCommunity} @@ -153,6 +159,7 @@ proc `$`*(self: CollectibleFilter): string = proc `%`*(t: CollectibleFilter): JsonNode {.inline.} = result = newJObject() + result["collectible_ids"] = %(t.collectibleIds) result["community_ids"] = %(t.communityIds) result["community_privileges_levels"] = %(t.communityPrivilegesLevels) result["filter_community"] = %(t.filterCommunity.int) diff --git a/vendor/status-go b/vendor/status-go index ee6621b066..b38e2c9278 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit ee6621b06610f0a3223cf875cc969abfa25750c9 +Subproject commit b38e2c9278b0f02368048d38a158da8f4a65bba7