Skip to content

Commit

Permalink
fix CALLBACK_BLOCK verification
Browse files Browse the repository at this point in the history
  • Loading branch information
jdogresorg committed Apr 29, 2024
1 parent 9c85437 commit 1f7e8a5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions indexer/includes/actions/issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,8 @@ function btnsIssue( $params=null, $data=null, $error=null){
if(!$error && $btInfo && $btnInfo->LOCK_CALLBACK && isset($data->CALLBACK_AMOUNT) && $data->CALLBACK_AMOUNT!=$btnInfo->CALLBACK_AMOUNT)
$error = 'invalid: CALLBACK_AMOUNT (locked)';

// Verify CALLBACK_BLOCK only increases in value
if(!$error && $btInfo && isset($data->CALLBACK_BLOCK) && $data->CALLBACK_BLOCK < $btnInfo->CALLBACK_BLOCK)
$error = 'invalid: CALLBACK_BLOCK (decreased)';

// Verify CALLBACK_BLOCK is greater than current block index
if(!$error && $btInfo && isset($data->CALLBACK_BLOCK) && $data->CALLBACK_BLOCK > $data->BLOCK_INDEX)
if(!$error && $btInfo && isset($data->CALLBACK_BLOCK) && $data->CALLBACK_BLOCK < $data->BLOCK_INDEX)
$error = 'invalid: CALLBACK_BLOCK (block index)';

// Verify CALLBACK_BLOCK can not be changed if supply is distributed
Expand Down

0 comments on commit 1f7e8a5

Please sign in to comment.