File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1- __VER__ = "3.4.110 "
1+ __VER__ = "3.4.111 "
22
33if __name__ == "__main__" :
44 with open ("pyproject.toml" , "rt" ) as fd :
Original file line number Diff line number Diff line change @@ -527,11 +527,11 @@ def eth_verify_text_signature(
527527
528528 message_prefix : str, optional
529529 A prefix to be added to the message before hashing (or signing). The default is "".
530-
530+
531531 Returns
532532 -------
533- bool or None
534- True if the signature is valid, False otherwise.
533+ str
534+ The address of the signer or None if the signature is invalid
535535 """
536536 types = ["string" ]
537537 values = [message_prefix + text ]
@@ -621,7 +621,10 @@ def eth_verify_payload_signature(
621621 indent : int, optional
622622 The indentation level for the JSON string. The default is 0.
623623
624-
624+ Returns
625+ -------
626+ str
627+ The address of the signer or None if the signature is invalid
625628 """
626629 result = None
627630 _payload = deepcopy (payload )
@@ -645,7 +648,7 @@ def eth_verify_payload_signature(
645648 text = str_data , signature = signature , message_prefix = message_prefix ,
646649 no_hash = no_hash , raise_if_error = raise_if_error
647650 )
648- if result is None :
651+ if result is None or result . lower () != sender . lower () :
649652 if raise_if_error :
650653 raise Exception ("Signature verification failed." )
651654 else :
You can’t perform that action at this time.
0 commit comments