From 3d0a21cbe7cf929b774d1c443ec0376f6fefbf24 Mon Sep 17 00:00:00 2001 From: Markus Levonyak Date: Thu, 10 Oct 2024 12:20:30 +0000 Subject: [PATCH] fix: remove salt from EIP-712 domain --- pantos/client/library/blockchains/ethereum.py | 4 +--- tests/blockchains/test_ethereum.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pantos/client/library/blockchains/ethereum.py b/pantos/client/library/blockchains/ethereum.py index f1ddba4..b297f7c 100644 --- a/pantos/client/library/blockchains/ethereum.py +++ b/pantos/client/library/blockchains/ethereum.py @@ -20,7 +20,6 @@ from pantos.client.library.constants import TOKEN_SYMBOL_PAN _EIP712_DOMAIN_NAME = 'Pantos' -_EIP712_DOMAIN_SALT = b'' _TRANSFER_MESSAGE_TYPES = { 'TransferRequest': [{ @@ -351,8 +350,7 @@ def __get_eip712_domain_data(self) -> dict[str, typing.Any]: 'name': _EIP712_DOMAIN_NAME, 'version': str(self.protocol_version.major), 'chainId': self._get_config()['chain_id'], - 'verifyingContract': self._get_config()['forwarder'], - 'salt': _EIP712_DOMAIN_SALT + 'verifyingContract': self._get_config()['forwarder'] } def __get_transfer_message_data( diff --git a/tests/blockchains/test_ethereum.py b/tests/blockchains/test_ethereum.py index 5be8725..dedabce 100644 --- a/tests/blockchains/test_ethereum.py +++ b/tests/blockchains/test_ethereum.py @@ -7,7 +7,6 @@ from pantos.common.blockchains.enums import Blockchain from pantos.client.library.blockchains.ethereum import _EIP712_DOMAIN_NAME -from pantos.client.library.blockchains.ethereum import _EIP712_DOMAIN_SALT from pantos.client.library.blockchains.ethereum import \ _TRANSFER_FROM_MESSAGE_TYPES from pantos.client.library.blockchains.ethereum import _TRANSFER_MESSAGE_TYPES @@ -30,8 +29,7 @@ def eip712_domain_data(protocol_version, chain_id, forwarder_address): 'name': _EIP712_DOMAIN_NAME, 'version': str(protocol_version.major), 'chainId': chain_id, - 'verifyingContract': forwarder_address, - 'salt': _EIP712_DOMAIN_SALT + 'verifyingContract': forwarder_address }