Skip to content

Commit 1ced0fc

Browse files
committed
chore: fix root CA load in deprecated client
1 parent 4782b29 commit 1ced0fc

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

pyinjective/client.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,8 @@ def __init__(
5959
self,
6060
network: Network,
6161
insecure: bool = False,
62-
credentials: grpc.ChannelCredentials = None,
62+
credentials = grpc.ssl_channel_credentials()
6363
):
64-
# load root CA cert
65-
if not insecure:
66-
if network.env == 'testnet':
67-
if credentials is None:
68-
with open(os.path.join(os.path.dirname(__file__), 'cert/testnet.crt'), 'rb') as f:
69-
credentials = grpc.ssl_channel_credentials(f.read())
70-
if network.env == 'mainnet':
71-
if credentials is None:
72-
with open(os.path.join(os.path.dirname(__file__), 'cert/mainnet.crt'), 'rb') as f:
73-
credentials = grpc.ssl_channel_credentials(f.read())
7464

7565
# chain stubs
7666
self.chain_channel = (

0 commit comments

Comments
 (0)