mirror of
https://github.com/logos-storage/nim-ethers.git
synced 2026-01-08 16:43:09 +00:00
Fixes isSyncing issue where object is evaluated as false
This commit is contained in:
parent
43cef2f7ca
commit
5b170adcb1
@ -224,6 +224,8 @@ method unsubscribe(subscription: JsonRpcSubscription) {.async.} =
|
|||||||
|
|
||||||
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*(provider: JsonRpcProvider) {.async.} =
|
method close*(provider: JsonRpcProvider) {.async.} =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user