Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jdogresorg committed May 22, 2024
1 parent 55aa08c commit 25f91f2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions indexer/includes/actions/callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,13 @@ function btnsCallback($params=null, $data=null, $error=null){
$balances = debitBalances($balances, $btInfo->CALLBACK_TICK, $data->CALLBACK_TICK);

// Calculate total number of database hits for this CALLBACK
$db_hits = count($holders) * 3; // 1 debits, 1 credits, 1 balances
$db_hits += 4; // 1 debits, 1 credits, 1 balances, 1 callback
if(!$error){
$db_hits = count($holders) * 3; // 1 debits, 1 credits, 1 balances
$db_hits += 4; // 1 debits, 1 credits, 1 balances, 1 callback

// Determine total transaction FEE based on database hits
$fees->AMOUNT = getTransactionFee($db_hits, $fees->TICK);
// Determine total transaction FEE based on database hits
$fees->AMOUNT = getTransactionFee($db_hits, $fees->TICK);
}

// Verify SOURCE has enough balances to cover FEE AMOUNT
if(!$error && !hasBalance($balances, $fees->TICK, $fees->AMOUNT))
Expand Down

0 comments on commit 25f91f2

Please sign in to comment.