Skip to content

Commit bd23dba

Browse files
committed
filter outputs from resolve
1 parent 943cb4f commit bd23dba

File tree

1 file changed

+3
-4
lines changed
  • python/thirdweb-ai/src/thirdweb_ai/common

1 file changed

+3
-4
lines changed

python/thirdweb-ai/src/thirdweb_ai/common/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ def clean_resolve(out: dict[str, Any]):
5656
"""Clean the response from the resolve function."""
5757
if "transactions" in out["data"]:
5858
for transaction in out["data"]["transactions"]:
59-
if "data" in transaction and is_encoded(transaction["data"]):
60-
transaction.pop("data")
61-
if "logs_bloom" in transaction:
62-
transaction.pop("logs_bloom")
59+
for key in list(transaction.keys()):
60+
if key not in TRANSACTION_KEYS_TO_KEEP:
61+
transaction.pop(key, None)
6362
return out
6463

6564

0 commit comments

Comments
 (0)