Skip to content

Commit

Permalink
Return summary in manual propose
Browse files Browse the repository at this point in the history
  • Loading branch information
bram-vdberg committed Nov 27, 2024
1 parent c1620a6 commit 53accd0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions solver_rewards/fetch/transfer_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def manual_propose(
transfers: list[Transfer],
period: AccountingPeriod,
config: AccountingConfig,
) -> None:
) -> str:
"""
Entry point to manual creation of rewards payout transaction.
This function generates the CSV transfer file to be pasted into the COW Safe app
Expand All @@ -48,8 +48,10 @@ def manual_propose(
csv_transfers, f"transfers-{period}.csv"
)

print(Transfer.summarize(transfers))
summary = Transfer.summarize(transfers)
print(summary)
print("Please cross check these results with the dashboard linked above.\n")
return summary


def auto_propose(
Expand Down Expand Up @@ -110,7 +112,7 @@ def auto_propose(
)


def main() -> None:
def main() -> None | str:
"""Generate transfers for an accounting period"""

args = generic_script_init(description="Fetch Complete Reimbursement")
Expand Down Expand Up @@ -169,7 +171,8 @@ def main() -> None:
config=config,
)
else:
manual_propose(transfers=payout_transfers, period=dune.period, config=config)
summary = manual_propose(transfers=payout_transfers, period=dune.period, config=config)
return summary


if __name__ == "__main__":
Expand Down

0 comments on commit 53accd0

Please sign in to comment.