diff --git a/web3/providers/auto.py b/web3/providers/auto.py index 6bb56a26a5..45705b37cd 100644 --- a/web3/providers/auto.py +++ b/web3/providers/auto.py @@ -14,6 +14,7 @@ ) HTTP_SCHEMES = {'http', 'https'} +WS_SCHEMES = {'ws', 'wss'} def load_provider_from_environment(): @@ -26,7 +27,7 @@ def load_provider_from_environment(): return IPCProvider(uri.path) elif uri.scheme in HTTP_SCHEMES: return HTTPProvider(uri_string) - elif uri.scheme == 'ws': + elif uri.scheme in WS_SCHEMES: return WebsocketProvider(uri_string) else: raise NotImplementedError(