From b85bb84e3b4cbe3d06496b19e1d841c7638c2b3b Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:09:21 +1100 Subject: [PATCH] fix error --- ethers/providers/jsonrpc/subscriptions.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ethers/providers/jsonrpc/subscriptions.nim b/ethers/providers/jsonrpc/subscriptions.nim index 6567f3b..e93213d 100644 --- a/ethers/providers/jsonrpc/subscriptions.nim +++ b/ethers/providers/jsonrpc/subscriptions.nim @@ -220,9 +220,10 @@ method unsubscribe*(subscriptions: PollingSubscriptions, {.async.} = subscriptions.filters.del(id) subscriptions.callbacks.del(id) + let sub = subscriptions.subscriptionMapping[id] subscriptions.subscriptionMapping.del(id) try: - discard await subscriptions.client.eth_uninstallFilter(subscriptions.subscriptionMapping[id]) + discard await subscriptions.client.eth_uninstallFilter(sub) except CancelledError as e: raise e except CatchableError as e: