From ac58848fa81c6dc3f682948f3f2a810c67a4ff07 Mon Sep 17 00:00:00 2001 From: harisang Date: Thu, 9 Jan 2025 18:13:29 +0200 Subject: [PATCH] simplify code --- src/fetch/transfer_file.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/fetch/transfer_file.py b/src/fetch/transfer_file.py index c67f0a9d..c7254f66 100644 --- a/src/fetch/transfer_file.py +++ b/src/fetch/transfer_file.py @@ -58,7 +58,6 @@ def auto_propose( slack_client: WebClient, dry_run: bool, config: AccountingConfig, - network: Network, ) -> None: """ Entry point auto creation of rewards payout transaction. @@ -103,7 +102,7 @@ def auto_propose( slack_client, channel=slack_channel, message=( - f"Solver Rewards transaction for network {network} with nonce {nonce} pending signatures.\n" + f"Solver Rewards transaction for network {config.dune_config.dune_blockchain} with nonce {nonce} pending signatures.\n" f"To sign and execute, visit:\n{config.payment_config.safe_queue_url}\n" f"More details in thread" ), @@ -115,10 +114,10 @@ def main() -> None: """Generate transfers for an accounting period""" args = generic_script_init(description="Fetch Complete Reimbursement") - network = Network(os.environ["NETWORK"]) - config = AccountingConfig.from_network(network) - accounting_period = AccountingPeriod(args.start, network) + config = AccountingConfig.from_network(os.environ["NETWORK"]) + + accounting_period = AccountingPeriod(args.start) orderbook = MultiInstanceDBFetcher( [config.orderbook_config.prod_db_url, config.orderbook_config.barn_db_url] @@ -169,7 +168,6 @@ def main() -> None: slack_client=slack_client, dry_run=args.dry_run, config=config, - network=network, ) else: manual_propose(transfers=payout_transfers, period=dune.period, config=config)