Skip to content

Commit 9bbbe67

Browse files
Merge pull request #188 from InjectiveLabs/f/set_lb_cookie_default
chore: set LB as default and deprecate K8S
2 parents 9490f9c + b26338f commit 9bbbe67

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Note that the [sync client](https://github.com/InjectiveLabs/sdk-python/blob/mas
7979

8080
### Changelogs
8181
**0.6.0.9**
82+
* Deprecate K8S and set LB as default
8283
* Proto re-gen
8384

8485
**0.6.0.8**

pyinjective/async_client.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,12 @@ def __init__(
9797
self.expiration_format = None
9898
self.load_balancer = load_balancer
9999
self.network = network
100+
self.cookie_type = "GCLB"
101+
self.expiration_format = "{}"
100102

101103
if self.network.string() == "testnet":
102104
self.load_balancer = False
103105

104-
if self.load_balancer is False:
105-
self.cookie_type = "grpc-cookie"
106-
self.expiration_format = "20{}"
107-
108-
else:
109-
self.cookie_type = "GCLB"
110-
self.expiration_format = "{}"
111-
112106
# chain stubs
113107
self.chain_channel = (
114108
grpc.aio.insecure_channel(network.grpc_endpoint)

pyinjective/constant.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,7 @@ def mainnet(cls, node='lb'):
118118
if node not in nodes:
119119
raise ValueError('Must be one of {}'.format(nodes))
120120

121-
if node == 'k8s':
122-
lcd_endpoint='https://k8s.mainnet.lcd.injective.network:443'
123-
tm_websocket_endpoint='wss://k8s.mainnet.tm.injective.network:443/websocket'
124-
grpc_endpoint='k8s.mainnet.chain.grpc.injective.network:443'
125-
grpc_exchange_endpoint='k8s.mainnet.exchange.grpc.injective.network:443'
126-
grpc_explorer_endpoint='k8s.mainnet.explorer.grpc.injective.network:443'
127-
elif node == 'lb':
121+
if node == 'lb':
128122
lcd_endpoint = 'https://k8s.global.mainnet.lcd.injective.network:443'
129123
tm_websocket_endpoint = 'wss://k8s.global.mainnet.tm.injective.network:443/websocket'
130124
grpc_endpoint = 'k8s.global.mainnet.chain.grpc.injective.network:443'

0 commit comments

Comments
 (0)