From 5b170adcb1ffb1dbb273d1b7679bf3d9a08adb76 Mon Sep 17 00:00:00 2001 From: benbierens Date: Thu, 7 Mar 2024 13:36:33 +0100 Subject: [PATCH] Fixes isSyncing issue where object is evaluated as false --- ethers/providers/jsonrpc.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ethers/providers/jsonrpc.nim b/ethers/providers/jsonrpc.nim index d5f7e8c..63cabdd 100644 --- a/ethers/providers/jsonrpc.nim +++ b/ethers/providers/jsonrpc.nim @@ -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.} =