Skip to content

Commit

Permalink
Fix Transaction Types
Browse files Browse the repository at this point in the history
* Added POS/POR detection types
  • Loading branch information
startailcoon committed Jun 8, 2024
1 parent 127728d commit 2d2154e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Models/Chain/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ function getType() {
return TransactionType::MINT_POW;
}

if(isset($this->contracts[0]->body->mining_id)) {
if($this->contracts[0]->body->mining_id == "INVESTOR") {
return TransactionType::MINT_POS;
}

return TransactionType::MINT_POR;
}

if(isset($this->vout[0]->scriptPubKey->type) && $this->vout[0]->scriptPubKey->type == "nonstandard") {
return TransactionType::MINT_GEN;
}
Expand Down

0 comments on commit 2d2154e

Please sign in to comment.