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
26542970ee
commit
b1f8c8efa2
|
@ -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…
Reference in New Issue