Bounds json deposit ammounts correctly

This commit is contained in:
Carl Beekhuizen 2020-09-17 14:55:15 +02:00
parent bc51a32eee
commit 8bfdd38aba
No known key found for this signature in database
GPG Key ID: 8F29E54F49E7AAB5

View File

@ -61,8 +61,8 @@ class Credential:
@property
def deposit_message(self) -> DepositMessage:
if MIN_DEPOSIT_AMOUNT > self.amount > MAX_DEPOSIT_AMOUNT:
raise ValidationError(f"{self.amount / ETH2GWEI} ETH is not within the bounds of the deposit-cli.")
if not MIN_DEPOSIT_AMOUNT <= self.amount <= MAX_DEPOSIT_AMOUNT:
raise ValidationError(f"{self.amount / ETH2GWEI} ETH deposits are not within the expected bounds of this cli.")
return DepositMessage(
pubkey=self.signing_pk,
withdrawal_credentials=self.withdrawal_credentials,