fix(curve): index tricrypto2 dependencies
This commit is contained in:
@@ -11,6 +11,7 @@ def encode_json_to_query_params(params: list[dict[str, Any]]):
|
||||
try:
|
||||
for i, param in enumerate(params):
|
||||
address: str = param["address"]
|
||||
contracts: str = param.get("contracts", [])
|
||||
tx_hash: str = param["tx_hash"]
|
||||
tokens: list[str] = param["tokens"]
|
||||
attributes: dict[str, str] = param.get("attributes", {})
|
||||
@@ -19,6 +20,8 @@ def encode_json_to_query_params(params: list[dict[str, Any]]):
|
||||
attributes["factory"] = EMPTY
|
||||
|
||||
encoded_address = f"address={address}"
|
||||
encoded_contracts = "&" + "&".join(
|
||||
[f"contracts[]={contract}" for contract in contracts]) if contracts else ''
|
||||
encoded_tx_hash = f"tx_hash={tx_hash}"
|
||||
encoded_tokens = "&".join([f"tokens[]={token}" for token in tokens])
|
||||
encoded_attributes = "&".join(
|
||||
@@ -28,7 +31,7 @@ def encode_json_to_query_params(params: list[dict[str, Any]]):
|
||||
]
|
||||
)
|
||||
|
||||
encoded_param = f"{encoded_address}&{encoded_tx_hash}&{encoded_tokens}&{encoded_attributes}"
|
||||
encoded_param = f"{encoded_address}{encoded_contracts}&{encoded_tx_hash}&{encoded_tokens}&{encoded_attributes}"
|
||||
encoded_param = encoded_param.rstrip("&")
|
||||
encoded_params.append(encoded_param)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user