correct check amount lte zero

This commit is contained in:
Claus-Peter Hübner 2022-06-16 00:32:30 +02:00
parent b9c48d8760
commit a73ff0aadf

View File

@ -518,7 +518,7 @@ export class AdminResolver {
throw new Error('The amount must be initialized!')
}
const amountObj = new Decimal(amount)
if (amountObj.isZero || amountObj.isNegative()) {
if (amountObj.lessThanOrEqualTo(new Decimal(0))) {
logger.error(`The amount=${amount} must be initialized with a positiv value!`)
throw new Error(`The amount=${amount} must be initialized with a positiv value!`)
}