fix(util): pass int `chainId` through

pull/35/head
MaxMustermann2 2 years ago
parent cfd550b553
commit 3e4533d486
No known key found for this signature in database
GPG Key ID: 4F4AB9DB6FF24C94
  1. 2
      pyhmy/util.py

@ -69,6 +69,8 @@ def chain_id_to_int(chainId):
if isinstance(chainId, str): if isinstance(chainId, str):
assert chainId in chainIds, f'Chain {chainId} unknown, specify an integer chainId' assert chainId in chainIds, f'Chain {chainId} unknown, specify an integer chainId'
return chainIds.get(chainId) return chainIds.get(chainId)
elif isinstance(chainId, int):
return chainId
else: else:
raise TypeError( 'chainId must be str or int' ) raise TypeError( 'chainId must be str or int' )

Loading…
Cancel
Save