Stop using deprecated method for :userAddress verification - use alternative API method.

pull/3498/head
derekpierre 2024-05-13 09:19:52 -04:00
parent f8b2bbba9a
commit f4080f6f86
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import re
from typing import Any, List, Union
from eth_account.account import Account
from eth_account.messages import HexBytes, encode_structured_data
from eth_account.messages import HexBytes, encode_typed_data
from eth_typing import ChecksumAddress
from eth_utils import to_checksum_address
@ -48,7 +48,7 @@ def _recover_user_address(**context) -> ChecksumAddress:
blockHash = eip712_message["message"]["blockHash"]
eip712_message["message"]["blockHash"] = HexBytes(blockHash)
signable_message = encode_structured_data(primitive=eip712_message)
signable_message = encode_typed_data(full_message=eip712_message)
except Exception as e:
# data could not be processed
raise InvalidContextVariableData(