mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 13:56:10 +00:00
fix(wallet) serializing type for collectibles settings to backend
It seems `%*` operator we use in the `rpc` generics doesn't use the `serializedFieldName` marker and `type` was serialized as `itemType` and value the enum name instead of `type` and integer value Updates: #13971
This commit is contained in:
parent
c14732260a
commit
c6b399c428
@ -451,3 +451,10 @@ proc fromJson*(t: JsonNode, T: typedesc[CollectiblePreferences]): CollectiblePre
|
||||
discard t.getProp("key", result.key)
|
||||
discard t.getProp("position", result.position)
|
||||
discard t.getProp("visible", result.visible)
|
||||
|
||||
proc `%`*(cp: CollectiblePreferences): JsonNode {.inline.} =
|
||||
result = newJObject()
|
||||
result["type"] = %int(cp.itemType)
|
||||
result["key"] = %cp.key
|
||||
result["position"] = %cp.position
|
||||
result["visible"] = %cp.visible
|
Loading…
x
Reference in New Issue
Block a user