Skip to content

Commit 8c13dcc

Browse files
committed
[v1.5.0] Update SafeMultisigTransactionSerializer to use Version for version comparison
1 parent 1c157bf commit 8c13dcc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

safe_transaction_service/history/serializers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
from drf_spectacular.utils import extend_schema_field
1313
from eth_typing import ChecksumAddress
14+
from packaging.version import Version
1415
from rest_framework import serializers
1516
from rest_framework.exceptions import NotFound, ValidationError
1617
from safe_eth.eth import EthereumClient, get_auto_ethereum_client
@@ -273,7 +274,7 @@ def validate(self, attrs):
273274
# For v1.5.0+, the isValidSignature(bytes32,bytes) expects the original message_hash (bytes32),
274275
safe_signature_hash = (
275276
safe_tx_hash
276-
if safe.get_version() == "1.5.0"
277+
if Version(safe.get_version()) >= Version("1.5.0")
277278
else safe_tx.safe_tx_hash_preimage
278279
)
279280
parsed_signatures = SafeSignature.parse_signature(

0 commit comments

Comments
 (0)