From 58573e7b2626652209be92debf1fb7e357dd3abb Mon Sep 17 00:00:00 2001 From: Kevin Davis Date: Tue, 16 Feb 2021 07:43:46 -0700 Subject: [PATCH] fix: allow ltv of zero (#830) --- x/hard/types/params.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/hard/types/params.go b/x/hard/types/params.go index b9fb0279..c076b878 100644 --- a/x/hard/types/params.go +++ b/x/hard/types/params.go @@ -51,8 +51,8 @@ func (bl BorrowLimit) Validate() error { if bl.MaximumLimit.IsNegative() { return fmt.Errorf("maximum limit USD cannot be negative: %s", bl.MaximumLimit) } - if !bl.LoanToValue.IsPositive() { - return fmt.Errorf("loan-to-value must be a positive integer: %s", bl.LoanToValue) + if bl.LoanToValue.IsNegative() { + return fmt.Errorf("loan-to-value must be a non-negative decimal: %s", bl.LoanToValue) } if bl.LoanToValue.GT(sdk.OneDec()) { return fmt.Errorf("loan-to-value cannot be greater than 1.0: %s", bl.LoanToValue)