Merge pull request #1732 from MPOS/no-txfee-check

[FIX] Do not add TXFee with txfee 0
This commit is contained in:
Sebastian Grewe 2014-02-12 07:33:15 +01:00
commit cb4211a618

View File

@ -342,9 +342,11 @@ class Transaction extends Base {
// Fetch the inserted record ID so we can return this at the end // Fetch the inserted record ID so we can return this at the end
$transaction_id = $this->insert_id; $transaction_id = $this->insert_id;
// Add TXFee record // Add TXFee record
if (!$this->addTransaction($account_id, $txfee, 'TXFee', NULL, $coin_address)) { if ($txfee > 0) {
$this->setErrorMessage('Failed to create TXFee transaction record in database: ' . $this->getError()); if (!$this->addTransaction($account_id, $txfee, 'TXFee', NULL, $coin_address)) {
return false; $this->setErrorMessage('Failed to create TXFee transaction record in database: ' . $this->getError());
return false;
}
} }
// Mark transactions archived // Mark transactions archived
if (!$this->setArchived($account_id, $this->insert_id)) { if (!$this->setArchived($account_id, $this->insert_id)) {