|
21 | 21 | from ethpm_types.abi import ABIType, MethodABI |
22 | 22 | from packaging.version import Version |
23 | 23 |
|
24 | | -from .client import BaseSafeClient, MockSafeClient, SafeClient, SafeTx, SafeTxConfirmation, SafeTxID |
| 24 | +from .client import ( |
| 25 | + BaseSafeClient, |
| 26 | + MockSafeClient, |
| 27 | + SafeClient, |
| 28 | + SafeTx, |
| 29 | + SafeTxConfirmation, |
| 30 | + SafeTxID, |
| 31 | +) |
25 | 32 | from .config import SafeConfig |
26 | 33 | from .exceptions import ( |
27 | 34 | ApeSafeError, |
@@ -494,9 +501,10 @@ def propose( |
494 | 501 |
|
495 | 502 | def pending_transactions(self) -> Iterator[tuple[SafeTx, list[SafeTxConfirmation]]]: |
496 | 503 | for executed_tx in self.client.get_transactions(confirmed=False): |
497 | | - yield self.create_safe_tx( |
498 | | - **executed_tx.model_dump(mode="json", by_alias=True) |
499 | | - ), executed_tx.confirmations |
| 504 | + yield ( |
| 505 | + self.create_safe_tx(**executed_tx.model_dump(mode="json", by_alias=True)), |
| 506 | + executed_tx.confirmations, |
| 507 | + ) |
500 | 508 |
|
501 | 509 | @property |
502 | 510 | def local_signers(self) -> list[AccountAPI]: |
@@ -849,13 +857,13 @@ def skip_signer(signer: AccountAPI): |
849 | 857 | sigs_by_signer, |
850 | 858 | **gas_args, |
851 | 859 | nonce=submitter_account.nonce, |
| 860 | + # NOTE: Because of `ape_ethereum.transactions.BaseTransaction.serialize_transaction` |
| 861 | + # doing a recovered signer check, and we have to make sure the address matches |
| 862 | + # the recovered address of the signed transaction. |
| 863 | + sender=submitter_account.address, |
852 | 864 | ) |
853 | | - txn = submitter_account.sign_transaction(exec_transaction, **signer_options) |
854 | | - # NOTE: Because of `ape_ethereum.transactions.BaseTransaction.serialize_transaction` |
855 | | - # doing a recovered signer check, and we gotta make sure the address matches |
856 | | - # the recovered address of the signed transaction. |
857 | | - txn.sender = submitter_account.address |
858 | | - return txn |
| 865 | + # NOTE: If `submitter` does not sign, this returns `None` which raises downstream |
| 866 | + return submitter_account.sign_transaction(exec_transaction, **signer_options) |
859 | 867 |
|
860 | 868 | elif submit: |
861 | 869 | # NOTE: User wanted to submit transaction, but we can't, so don't publish to API |
|
0 commit comments