Fixes isSyncing issue where object is evaluated as false (#68)

This commit is contained in:
Ben Bierens 2024-03-08 12:55:36 +01:00 committed by GitHub
parent 4a57089ed2
commit 942fe034fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -270,6 +270,8 @@ method unsubscribe*(
method isSyncing*(provider: JsonRpcProvider): Future[bool] {.async.} = method isSyncing*(provider: JsonRpcProvider): Future[bool] {.async.} =
let response = await provider.send("eth_syncing") let response = await provider.send("eth_syncing")
if response.kind == JsonNodeKind.JObject:
return true
return response.getBool() return response.getBool()
method close*( method close*(