fix(dto/chat): fix toChannelMember where isAidropAddress can be null

This commit is contained in:
Jonathan Rainville 2023-07-19 13:22:29 -04:00
parent 8a97c0ca3a
commit 8696234273

View File

@ -246,7 +246,7 @@ proc toChannelMember*(jsonObj: JsonNode, memberId: string, joined: bool): ChatMe
var revealedAccountsObj: JsonNode var revealedAccountsObj: JsonNode
if jsonObj.getProp("revealed_accounts", revealedAccountsObj): if jsonObj.getProp("revealed_accounts", revealedAccountsObj):
for revealedAccountObj in revealedAccountsObj: for revealedAccountObj in revealedAccountsObj:
if revealedAccountObj["isAirdropAddress"].getBool: if revealedAccountObj{"isAirdropAddress"}.getBool:
var chainIdsObj: JsonNode var chainIdsObj: JsonNode
var chainIds: seq[int] = @[] var chainIds: seq[int] = @[]
if revealedAccountObj.getProp("chain_ids", chainIdsObj): if revealedAccountObj.getProp("chain_ids", chainIdsObj):