From 8bfdd38aba2680a2ec990c7718309992d20b4e59 Mon Sep 17 00:00:00 2001 From: Carl Beekhuizen Date: Thu, 17 Sep 2020 14:55:15 +0200 Subject: [PATCH] Bounds json deposit ammounts correctly --- eth2deposit/credentials.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth2deposit/credentials.py b/eth2deposit/credentials.py index cf5cd9b..abcb222 100644 --- a/eth2deposit/credentials.py +++ b/eth2deposit/credentials.py @@ -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,