From e04a79474a62e52316e05ebf7d8ed926509b172e Mon Sep 17 00:00:00 2001 From: z80 Date: Tue, 28 Nov 2023 16:08:43 -0500 Subject: [PATCH] fix: keyfile accounts now properly handling signablemessage --- src/ape_accounts/accounts.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ape_accounts/accounts.py b/src/ape_accounts/accounts.py index 17919edb60..374c2d5dd8 100644 --- a/src/ape_accounts/accounts.py +++ b/src/ape_accounts/accounts.py @@ -189,14 +189,12 @@ def sign_message(self, msg: Any, **signer_options) -> Optional[MessageSignature] # Convert EIP712Message to SignableMessage for handling below msg = msg.signable_message + elif isinstance(msg, SignableMessage): + user_approves = self.__autosign or click.confirm(f"{msg}\n\nSign: ") else: logger.warning("Unsupported message type, (type=%r, msg=%r)", type(msg), msg) return None - # msg should be a SignableMessage at this point - if isinstance(msg, SignableMessage): - user_approves = self.__autosign or click.confirm(f"{msg}\n\nSign: ") - if not user_approves: return None signed_msg = EthAccount.sign_message(msg, self.__key)