Skip to content

Commit ca268c3

Browse files
authored
Update helpers.go (#657)
Use decimal.Zero
1 parent 44809d6 commit ca268c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v2/common/helpers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func AmountToLotSize(amount, minQty, stepSize string, precision int) string {
1212
amountDec := decimal.RequireFromString(amount)
1313
minQtyDec := decimal.RequireFromString(minQty)
1414
baseAmountDec := amountDec.Sub(minQtyDec)
15-
if baseAmountDec.LessThan(decimal.RequireFromString("0")) {
15+
if baseAmountDec.LessThan(decimal.Zero) {
1616
return "0"
1717
}
1818
stepSizeDec := decimal.RequireFromString(stepSize)

0 commit comments

Comments
 (0)