Skip to content

Commit

Permalink
Fix typying proposer can be None
Browse files Browse the repository at this point in the history
  • Loading branch information
moisses89 committed Oct 15, 2024
1 parent 3bcc485 commit 6ad7539
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _build_transaction_service_tx(
) -> TransactionServiceTx:
signatures = self.parse_signatures(tx_raw)
safe_tx = TransactionServiceTx(
to_checksum_address(tx_raw["proposer"]),
to_checksum_address(tx_raw["proposer"]) if tx_raw["proposer"] else None,
self.ethereum_client,
tx_raw["safe"],
tx_raw["to"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from typing import Optional

from eth_typing import ChecksumAddress

from safe_eth.safe import SafeTx


class TransactionServiceTx(SafeTx):
def __init__(self, proposer: ChecksumAddress, *args, **kwargs):
def __init__(self, proposer: Optional[ChecksumAddress], *args, **kwargs):
super().__init__(*args, **kwargs)
self.proposer = proposer

0 comments on commit 6ad7539

Please sign in to comment.