@@ -67,7 +67,7 @@ def __init__(
6767
6868 @property
6969 def safe_details (self ) -> SafeDetails :
70- response = self ._get (f"safes/{ self .address } / " )
70+ response = self ._get (f"/ safes/{ self .address } " )
7171 return SafeDetails .model_validate (response .json ())
7272
7373 def get_next_nonce (self ) -> int :
@@ -78,7 +78,7 @@ def _all_transactions(self) -> Iterator[SafeApiTxData]:
7878 Get all transactions from safe, both confirmed and unconfirmed
7979 """
8080
81- url = f"safes/{ self .address } /all-transactions/ "
81+ url = f"/ safes/{ self .address } /all-transactions"
8282 while url :
8383 response = self ._get (url )
8484 data = response .json ()
@@ -97,7 +97,7 @@ def _all_transactions(self) -> Iterator[SafeApiTxData]:
9797 url = data .get ("next" )
9898
9999 def get_confirmations (self , safe_tx_hash : SafeTxID ) -> Iterator [SafeTxConfirmation ]:
100- url = f"multisig-transactions/{ str (safe_tx_hash )} /confirmations/ "
100+ url = f"/ multisig-transactions/{ str (safe_tx_hash )} /confirmations"
101101 while url :
102102 response = self ._get (url )
103103 data = response .json ()
@@ -135,7 +135,7 @@ def post_transaction(
135135 # Signature handled above.
136136 post_dict .pop ("signatures" )
137137
138- url = f"safes/{ tx_data .safe } /multisig-transactions/ "
138+ url = f"/ safes/{ tx_data .safe } /multisig-transactions"
139139 response = self ._post (url , json = post_dict )
140140 return response
141141
@@ -151,7 +151,7 @@ def post_signatures(
151151 safe_tx_hash = safe_tx_or_hash
152152
153153 safe_tx_hash = cast (SafeTxID , to_hex (HexBytes (safe_tx_hash )))
154- url = f"multisig-transactions/{ safe_tx_hash } /confirmations/ "
154+ url = f"/ multisig-transactions/{ safe_tx_hash } /confirmations"
155155 signature = to_hex (
156156 HexBytes (b"" .join ([x .encode_rsv () for x in order_by_signer (signatures )]))
157157 )
@@ -166,7 +166,7 @@ def post_signatures(
166166 def estimate_gas_cost (
167167 self , receiver : AddressType , value : int , data : bytes , operation : int = 0
168168 ) -> Optional [int ]:
169- url = f"safes/{ self .address } /multisig-transactions/estimations/ "
169+ url = f"/ safes/{ self .address } /multisig-transactions/estimations"
170170 request : dict = {
171171 "to" : receiver ,
172172 "value" : value ,
@@ -178,7 +178,7 @@ def estimate_gas_cost(
178178 return int (to_hex (HexBytes (gas )), 16 )
179179
180180 def get_delegates (self ) -> dict ["AddressType" , list ["AddressType" ]]:
181- url = "delegates/ "
181+ url = "/delegates "
182182 delegates : dict [AddressType , list [AddressType ]] = {}
183183
184184 while url :
@@ -209,7 +209,7 @@ def add_delegate(self, delegate: "AddressType", label: str, delegator: "AccountA
209209 "label" : label ,
210210 "signature" : sig .encode_rsv ().hex (),
211211 }
212- self ._post ("delegates/ " , json = payload )
212+ self ._post ("/delegates " , json = payload )
213213
214214 def remove_delegate (self , delegate : "AddressType" , delegator : "AccountAPI" ):
215215 msg_hash = self .create_delegate_message (delegate )
@@ -222,7 +222,7 @@ def remove_delegate(self, delegate: "AddressType", delegator: "AccountAPI"):
222222 "delegator" : delegator .address ,
223223 "signature" : sig .encode_rsv ().hex (),
224224 }
225- self ._delete (f"delegates/{ delegate } / " , json = payload )
225+ self ._delete (f"/ delegates/{ delegate } " , json = payload )
226226
227227
228228__all__ = [
0 commit comments