diff --git a/eth2deposit/utils/validation.py b/eth2deposit/utils/validation.py index 5d1416e..23a513d 100644 --- a/eth2deposit/utils/validation.py +++ b/eth2deposit/utils/validation.py @@ -60,10 +60,10 @@ def validate_deposit(deposit_data_dict: Dict[str, Any], credential: Credential) # Verify withdrawal credential if len(withdrawal_credentials) != 32: return False - if withdrawal_credentials[:1] == BLS_WITHDRAWAL_PREFIX: + if withdrawal_credentials[:1] == BLS_WITHDRAWAL_PREFIX == credential.withdrawal_prefix: if withdrawal_credentials[1:] != SHA256(credential.withdrawal_pk)[1:]: return False - elif withdrawal_credentials[:1] == ETH1_ADDRESS_WITHDRAWAL_PREFIX: + elif withdrawal_credentials[:1] == ETH1_ADDRESS_WITHDRAWAL_PREFIX == credential.withdrawal_prefix: if withdrawal_credentials[1:12] != b'\x00' * 11: return False if credential.eth1_withdrawal_address is None: