diff --git a/brownie_safe.py b/brownie_safe.py index 9772b53..a3a45eb 100644 --- a/brownie_safe.py +++ b/brownie_safe.py @@ -384,7 +384,7 @@ class BrownieSafeV141(BrownieSafeBase, SafeV141): } -def BrownieSafe(address, base_url=None, multisend=None, auth_token=None): +def BrownieSafe(address, base_url=None, multisend=None, api_key=None): """ Create an BrownieSafe from an address or a ENS name and use a default connection. """ @@ -397,9 +397,10 @@ def BrownieSafe(address, base_url=None, multisend=None, auth_token=None): brownie_safe.transaction_service = TransactionServiceApi(ethereum_client.get_network(), ethereum_client, base_url) brownie_safe.multisend = MultiSend(ethereum_client, multisend, call_only=True) - token = auth_token or os.environ.get("SAFE_AUTH_TOKEN") - if token: - brownie_safe.transaction_service.http_session.headers["Authorization"] = f"Bearer {token}" + api_key = os.getenv("SAFE_TRANSACTION_SERVICE_API_KEY") if api_key is None else api_key + api_key = api_key.strip() if api_key else api_key + if api_key: + brownie_safe.transaction_service.http_session.headers["Authorization"] = f"Bearer {api_key}" return brownie_safe - \ No newline at end of file + diff --git a/pyproject.toml b/pyproject.toml index aae65ea..b681e59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,9 +11,7 @@ readme = "readme.md" python = ">=3.10,<3.13" # eth-brownie v1.20.7 requires web3==6.15.1 eth-brownie = ">=1.20.7" -# safe-eth-py v6.0.0 renames gnosis to safe_eth -# safe-eth-py v7.0.0 requires web3>=7.0.0 -safe-eth-py = ">=6.0.0,<7" +safe-eth-py = { git = "https://github.com/wavey0x/safe-eth-py.git", branch = "wavey_edit" } trezor = ">=0.13.8" [tool.poetry.dev-dependencies]