chore: feedback

Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
This commit is contained in:
Adam Uhlíř 2024-11-28 08:52:36 +01:00 committed by GitHub
parent 7a57a45391
commit e7bcc75d6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -280,9 +280,9 @@ proc confirm*(
let error = blockSubscriptionResult.error() let error = blockSubscriptionResult.error()
if error of SubscriptionError: if error of SubscriptionError:
raise cast[ref SubscriptionError](error) raise (ref SubscriptionError)(error)
elif error of CancelledError: elif error of CancelledError:
raise cast[ref CancelledError](error) raise (ref CancelledError)(error)
else: else:
raise error.toErr(ProviderError) raise error.toErr(ProviderError)

View File

@ -244,7 +244,7 @@ method subscribeBlocks(subscriptions: PollingSubscriptions,
try: try:
if blck =? (await subscriptions.client.eth_getBlockByHash(hash, false)): if blck =? (await subscriptions.client.eth_getBlockByHash(hash, false)):
onBlock(success(blck)) onBlock(success(blck))
except CancelledError as e: except CancelledError:
discard discard
except CatchableError as e: except CatchableError as e:
let error = e.toErr(SubscriptionError, "HTTP polling: There was an exception while getting subscription's block: " & e.msg) let error = e.toErr(SubscriptionError, "HTTP polling: There was an exception while getting subscription's block: " & e.msg)