Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang committed Jan 9, 2025
1 parent 470dd51 commit ac58848
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/fetch/transfer_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
),
Expand All @@ -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]
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ac58848

Please sign in to comment.