Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit 28a4e36

Browse files
fix: use full epoch date range instead of yesterday
1 parent abc67aa commit 28a4e36

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

fee_allocator/fees_collected/get_report.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ def get_report(start_date, end_date, env_id):
3838
print(f"No net fees for env {env_id}, returning empty report")
3939
return {}
4040

41-
depositors = {k.replace("-v3", ""): int(v) for k, v in data["depositors"].items()}
41+
depositors = {
42+
k.replace("-v3", ""): int(v)
43+
for k, v in data["depositors"].items()
44+
if int(v) > 0
45+
}
4246
total_gross = sum(depositors.values())
4347

4448
if total_gross != total_gross_usdc:
@@ -71,11 +75,10 @@ def get_report(start_date, end_date, env_id):
7175
if bool(int(today.strftime("%V")) % 2):
7276
# week number is uneven; there should be a new report
7377

74-
yesterday = today - timedelta(days=1)
7578
epoch_start = today - timedelta(days=14)
7679

7780
v2_report = get_report(
78-
yesterday.strftime("%Y-%m-%d"), today.strftime("%Y-%m-%d"), V2_ENV_ID
81+
epoch_start.strftime("%Y-%m-%d"), today.strftime("%Y-%m-%d"), V2_ENV_ID
7982
)
8083

8184
with open(
@@ -85,7 +88,7 @@ def get_report(start_date, end_date, env_id):
8588
json.dump(v2_report, f, indent=2)
8689

8790
v3_report = get_report(
88-
yesterday.strftime("%Y-%m-%d"), today.strftime("%Y-%m-%d"), V3_ENV_ID
91+
epoch_start.strftime("%Y-%m-%d"), today.strftime("%Y-%m-%d"), V3_ENV_ID
8992
)
9093

9194
with open(

0 commit comments

Comments
 (0)