Do not allow negative fees.

This commit is contained in:
Arthur Britto
2012-12-25 16:21:17 -08:00
parent 77d92e1767
commit 3ccf163fb3
3 changed files with 5 additions and 2 deletions

View File

@@ -57,6 +57,9 @@ TER Transactor::payFee()
return telINSUF_FEE_P;
}
if (saPaid.isNegative())
return temBAD_AMOUNT;
if (!saPaid) return tesSUCCESS;
// Deduct the fee, so it's not available during the transaction.