Skip to content

Commit

Permalink
Removing mockHyperdriveMath in addresses json if it exists (#1293)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheng Lundquist authored Jan 27, 2024
1 parent b44b518 commit f066942
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/ethpy/ethpy/hyperdrive/addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,10 @@ def fetch_hyperdrive_address_from_uri(contracts_uri: str) -> HyperdriveAddresses
raise ConnectionError(f"Request failed with status code {response.status_code} @ {time.ctime()}")
addresses_json = response.json()

# mockHyperdriveMath still exists in artifacts on infra, but it shouldn't be there.
# Hence, we remove it here
if "mockHyperdriveMath" in addresses_json:
del addresses_json["mockHyperdriveMath"]

addresses = HyperdriveAddresses(**{camel_to_snake(key): value for key, value in addresses_json.items()})
return addresses

0 comments on commit f066942

Please sign in to comment.