From 942fe034fc96ec32942a1481379db5bb068717fd Mon Sep 17 00:00:00 2001 From: Ben Bierens <39762930+benbierens@users.noreply.github.com> Date: Fri, 8 Mar 2024 12:55:36 +0100 Subject: [PATCH] Fixes isSyncing issue where object is evaluated as false (#68) --- ethers/providers/jsonrpc.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ethers/providers/jsonrpc.nim b/ethers/providers/jsonrpc.nim index 95cca3f..76380b6 100644 --- a/ethers/providers/jsonrpc.nim +++ b/ethers/providers/jsonrpc.nim @@ -270,6 +270,8 @@ method unsubscribe*( 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*(