validate name buyer's balance relative to the amount of the name purchase in addition to the fee

This commit is contained in:
kennycud 2025-06-17 15:08:20 -07:00
parent 89236d6504
commit 5b402e0bca

View File

@ -102,7 +102,7 @@ public class BuyNameTransaction extends Transaction {
return ValidationResult.INVALID_AMOUNT;
// Check buyer has enough funds
if (buyer.getConfirmedBalance(Asset.QORT) < this.buyNameTransactionData.getFee())
if (buyer.getConfirmedBalance(Asset.QORT) < this.buyNameTransactionData.getFee() + this.buyNameTransactionData.getAmount())
return ValidationResult.NO_BALANCE;
return ValidationResult.OK;