Skip to content

Commit

Permalink
fix: support infura (who has a differen URI shape)
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Aug 24, 2023
1 parent 6fd6e0a commit 0795aff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions silverback/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class Web3SubscriptionsManager:
subscription_polling_time: float = 0.1 # secs

def __init__(self, ws_provider_uri: str):
# TODO: Temporary until a more permanent solution is added to ProviderAPI
if "infura" in ws_provider_uri:
ws_provider_uri = ws_provider_uri.replace("v3", "ws/v3")

self._ws_provider_uri = ws_provider_uri

# Stateful
Expand Down

0 comments on commit 0795aff

Please sign in to comment.