mirror of
https://github.com/logos-storage/nim-ethers.git
synced 2026-05-11 20:49:30 +00:00
chore: feedback
Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
This commit is contained in:
parent
7a57a45391
commit
e7bcc75d6b
@ -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)
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user