mirror of
https://github.com/logos-storage/nim-ethers.git
synced 2026-01-06 23:53:10 +00:00
Fixes isSyncing issue where object is evaluated as false (#68)
This commit is contained in:
parent
4a57089ed2
commit
942fe034fc
@ -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*(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user