diff --git a/ape_safe/client/__init__.py b/ape_safe/client/__init__.py index 1edf934..58088c0 100644 --- a/ape_safe/client/__init__.py +++ b/ape_safe/client/__init__.py @@ -1,3 +1,4 @@ +import json from datetime import datetime from functools import reduce from typing import Dict, Iterator, Optional, Union, cast @@ -27,7 +28,14 @@ from ape_safe.utils import get_safe_tx_hash, order_by_signer APE_SAFE_VERSION = get_package_version(__name__) -ORIGIN = f"Ape-Safe/{APE_SAFE_VERSION} ({USER_AGENT})" +APE_SAFE_USER_AGENT = f"Ape-Safe/{APE_SAFE_VERSION} {USER_AGENT}" +# NOTE: Origin must be a string, but can be json that contains url & name fields +ORIGIN = json.dumps( + dict( + url="https://apeworx.io", name="Ape Safe", ua=APE_SAFE_USER_AGENT + ) +) +assert len(ORIGIN) <= 200 # NOTE: Must be less than 200 chars TRANSACTION_SERVICE_URL = { # NOTE: If URLs need to be updated, a list of available service URLs can be found at