Skip to content

Commit

Permalink
Update chia/cmds/param_types.py
Browse files Browse the repository at this point in the history
Co-authored-by: Kyle Altendorf <sda@fstab.net>
  • Loading branch information
jack60612 and altendky authored Jun 20, 2024
1 parent bf9c4bf commit 05938bf
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions chia/cmds/param_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ def validate_decimal_xch(
fail_func("Value must be decimal dotted value in XCH (e.g. 0.00005)", param, ctx)
if d_value.is_signed():
fail_func("Value can not be negative", param, ctx)
if not d_value.is_zero() and d_value < one_decimal_mojo:
fail_func(
"Invalid amount of mojos, too many zeros. Either give zero or at least 1 mojo (0.000000000001 xch).",
param,
ctx,
)
if d_value % one_decimal_mojo != Decimal(0): # if there is a remainder, it contains a value smaller than one mojo
fail_func("Invalid amount of mojos, Partial mojos (Fractions of a mojo).", param, ctx)
return d_value
Expand Down

0 comments on commit 05938bf

Please sign in to comment.