mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 14:26:34 +00:00
fix: check null
This commit is contained in:
parent
19d4279237
commit
7d56e66a86
@ -9,6 +9,7 @@ proc fromEvent*(jsonSignal: JsonNode): Signal =
|
|||||||
signal.blockNumber = jsonSignal["event"]{"blockNumber"}.getInt
|
signal.blockNumber = jsonSignal["event"]{"blockNumber"}.getInt
|
||||||
signal.erc20 = jsonSignal["event"]{"erc20"}.getBool
|
signal.erc20 = jsonSignal["event"]{"erc20"}.getBool
|
||||||
signal.accounts = @[]
|
signal.accounts = @[]
|
||||||
|
if jsonSignal["event"]["accounts"].kind != JNull:
|
||||||
for account in jsonSignal["event"]["accounts"]:
|
for account in jsonSignal["event"]["accounts"]:
|
||||||
signal.accounts.add(account.getStr)
|
signal.accounts.add(account.getStr)
|
||||||
result = signal
|
result = signal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user