Fixes isSyncing issue where object is evaluated as false

This commit is contained in:
benbierens 2024-03-07 13:36:33 +01:00
parent 43cef2f7ca
commit 5b170adcb1
No known key found for this signature in database
GPG Key ID: 877D2C2E09A22F3A

View File

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