Skip to content

Commit

Permalink
refactor: move the rpc call top in unsubscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau committed Oct 22, 2024
1 parent 7b24ffe commit 3b66799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ethers/providers/jsonrpc/subscriptions.nim
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ method subscribeLogs(subscriptions: PollingSubscriptions,
method unsubscribe*(subscriptions: PollingSubscriptions,
id: JsonNode)
{.async.} =
discard await subscriptions.client.eth_uninstallFilter(subscriptions.subscriptionMapping[id])
subscriptions.filters.del(id)
subscriptions.callbacks.del(id)
discard await subscriptions.client.eth_uninstallFilter(subscriptions.subscriptionMapping[id])
subscriptions.subscriptionMapping.del(id)

0 comments on commit 3b66799

Please sign in to comment.