From 3e4533d48642b9f715a7e034df284cf98bd6a302 Mon Sep 17 00:00:00 2001 From: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com> Date: Tue, 23 Aug 2022 14:09:56 +0000 Subject: [PATCH] fix(util): pass int `chainId` through --- pyhmy/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyhmy/util.py b/pyhmy/util.py index 2c10031..36c350f 100644 --- a/pyhmy/util.py +++ b/pyhmy/util.py @@ -69,6 +69,8 @@ def chain_id_to_int(chainId): if isinstance(chainId, str): assert chainId in chainIds, f'Chain {chainId} unknown, specify an integer chainId' return chainIds.get(chainId) + elif isinstance(chainId, int): + return chainId else: raise TypeError( 'chainId must be str or int' )