fix(signals_manager): ensure `savedAddresses` event has `JNull` check
There's something off with the `savedAddresses` signal data, which causes it to be `JNull` instead of an empty array (`JArray`) and breaks signal decoding. Ultimately this should be fixed in status-go, but this unblocks Desktop.
This commit is contained in:
parent
f0e238dce6
commit
013e226c66
|
@ -120,7 +120,7 @@ proc fromEvent*(T: type MessageSignal, event: JsonNode): MessageSignal =
|
|||
for jsonVerificationRequest in event["event"]["verificationRequests"]:
|
||||
signal.verificationRequests.add(jsonVerificationRequest.toVerificationRequest())
|
||||
|
||||
if event["event"]{"savedAddresses"} != nil:
|
||||
if event["event"]{"savedAddresses"} != nil and event["event"]{"savedAddresses"}.kind != JNull:
|
||||
for jsonSavedAddress in event["event"]["savedAddresses"]:
|
||||
signal.savedAddresses.add(jsonSavedAddress.toSavedAddressDto())
|
||||
|
||||
|
|
Loading…
Reference in New Issue