From 72ca466957311cb13ce2500a450505959df842c1 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 8 Oct 2024 12:12:14 -0400 Subject: [PATCH] fix: specify behavior of the encoder for `TokenType` enums --- src/app_service/common/types.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app_service/common/types.nim b/src/app_service/common/types.nim index 6ca65a8dff..9336e195bf 100644 --- a/src/app_service/common/types.nim +++ b/src/app_service/common/types.nim @@ -1,3 +1,5 @@ +import "json_serialization" + type ContentType* {.pure.} = enum NewMessagesMarker = -3 @@ -92,6 +94,8 @@ type TokenType* {.pure.} = enum Unknown = 4, ENS = 5 +TokenType.configureJsonSerialization(EnumAsNumber) + type RequestToJoinState* {.pure.} = enum None = 0 InProgress