Skip to content

Commit 64c6de7

Browse files
authored
Merge pull request #38 from scrtlabs/main
Remove hard-coded consensus pubkey
2 parents 1f9415b + 221ac4f commit 64c6de7

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

secret_sdk/client/lcd/lcdclient.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,6 @@
5656
default_gas_prices = Coins.from_data([{"amount": 0.25, "denom": "uscrt"}])
5757
default_gas_adjustment = 1
5858

59-
mainnet_chain_ids = {"secret-2", "secret-3", "secret-4"}
60-
61-
# mainnetConsensusIoPubKey = bytes.fromhex(
62-
# "083b1a03661211d5a4cc8d39a77795795862f7730645573b2bcc2c1920c53c04"
63-
# )
64-
mainnetConsensusIoPubKey = bytes.fromhex(
65-
"53202482cf19e79603db4f75fd18d29e674c1f8c85f4f29ce655aa8d5efc9d2f"
66-
) # == base64.b64decode("UyAkgs8Z55YD2091/RjSnmdMH4yF9PKc5lWqjV78nS8=")
67-
6859
REQUEST_CONFIG = {
6960
"GET_TIMEOUT": 30,
7061
"POST_TIMEOUT": 30,
@@ -118,10 +109,7 @@ def __init__(
118109
self.tx = AsyncTxAPI(self)
119110
self.registration = AsyncRegistrationAPI(self)
120111

121-
if self.chain_id in mainnet_chain_ids:
122-
consensus_io_pub_key = mainnetConsensusIoPubKey
123-
else:
124-
consensus_io_pub_key = RegistrationAPI(self).consensus_io_pub_key()
112+
consensus_io_pub_key = RegistrationAPI(self).consensus_io_pub_key()
125113
self.encrypt_utils = EncryptionUtils(consensus_io_pub_key, encryption_seed)
126114

127115
def wallet(self, key: Key) -> AsyncWallet:
@@ -309,10 +297,7 @@ def __init__(
309297
self.tx = TxAPI(self)
310298
self.registration = RegistrationAPI(self)
311299

312-
if self.chain_id in mainnet_chain_ids:
313-
consensus_io_pub_key = mainnetConsensusIoPubKey
314-
else:
315-
consensus_io_pub_key = self.registration.consensus_io_pub_key()
300+
consensus_io_pub_key = self.registration.consensus_io_pub_key()
316301
self.encrypt_utils = EncryptionUtils(consensus_io_pub_key, encryption_seed)
317302

318303
async def __aenter__(self):

0 commit comments

Comments
 (0)