Skip to content

Commit 25eccbd

Browse files
authored
filter resolve (#30)
1 parent 2027f3e commit 25eccbd

File tree

1 file changed

+5
-0
lines changed
  • python/thirdweb-ai/src/thirdweb_ai/common

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ def clean_resolve(out: dict[str, Any]):
5959
for key in list(transaction.keys()):
6060
if key not in TRANSACTION_KEYS_TO_KEEP:
6161
transaction.pop(key, None)
62+
if "events" in out["data"]:
63+
for event in out["data"]["events"]:
64+
for key in list(event.keys()):
65+
if key not in EVENT_KEYS_TO_KEEP:
66+
event.pop(key, None)
6267
return out
6368

6469

0 commit comments

Comments
 (0)