Skip to content

Commit

Permalink
fix log
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 13, 2023
1 parent a04db77 commit 2bbb23e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/order/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func WithUnits(amount string, must bool) func(context.Context, *Handler) error {
return err
}
if _amount.Cmp(decimal.NewFromInt32(0)) <= 0 {
return fmt.Errorf("units is 0")
return fmt.Errorf("invalid units")
}
h.Units = amount
return nil
Expand All @@ -181,7 +181,7 @@ func WithBalanceAmount(amount *string, must bool) func(context.Context, *Handler
return func(ctx context.Context, h *Handler) error {
if amount == nil {
if must {
return fmt.Errorf("invalid parentorderid")
return fmt.Errorf("invalid balanceamount")
}
return nil
}
Expand All @@ -190,7 +190,7 @@ func WithBalanceAmount(amount *string, must bool) func(context.Context, *Handler
return err
}
if _amount.Cmp(decimal.NewFromInt32(0)) <= 0 {
return fmt.Errorf("units is 0")
return fmt.Errorf("invalid balanceamount")
}
h.BalanceAmount = amount
return nil
Expand Down

0 comments on commit 2bbb23e

Please sign in to comment.