From e7bcc75d6bc086bf017de260a630981bdb2fcf7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Uhl=C3=AD=C5=99?= Date: Thu, 28 Nov 2024 08:52:36 +0100 Subject: [PATCH] chore: feedback Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com> --- ethers/provider.nim | 4 ++-- ethers/providers/jsonrpc/subscriptions.nim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ethers/provider.nim b/ethers/provider.nim index 9c489ef..d6915f2 100644 --- a/ethers/provider.nim +++ b/ethers/provider.nim @@ -280,9 +280,9 @@ proc confirm*( let error = blockSubscriptionResult.error() if error of SubscriptionError: - raise cast[ref SubscriptionError](error) + raise (ref SubscriptionError)(error) elif error of CancelledError: - raise cast[ref CancelledError](error) + raise (ref CancelledError)(error) else: raise error.toErr(ProviderError) diff --git a/ethers/providers/jsonrpc/subscriptions.nim b/ethers/providers/jsonrpc/subscriptions.nim index c060cc9..9da7e36 100644 --- a/ethers/providers/jsonrpc/subscriptions.nim +++ b/ethers/providers/jsonrpc/subscriptions.nim @@ -244,7 +244,7 @@ method subscribeBlocks(subscriptions: PollingSubscriptions, try: if blck =? (await subscriptions.client.eth_getBlockByHash(hash, false)): onBlock(success(blck)) - except CancelledError as e: + except CancelledError: discard except CatchableError as e: let error = e.toErr(SubscriptionError, "HTTP polling: There was an exception while getting subscription's block: " & e.msg)