Skip to content

Commit

Permalink
+failed exchange support
Browse files Browse the repository at this point in the history
  • Loading branch information
deemru committed Nov 26, 2021
1 parent 39e288d commit 04b34ea
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions include/BlockchainParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,24 @@ private function processFailedTransaction( $txkey, $tx )
GROUP => FAILED_GROUP,
] );
break;
case TX_EXCHANGE:
// https://docs.waves.tech/en/blockchain/transaction/transaction-validation
$fee = $tx['fee'];
$afee = isset( $tx['feeAssetId'] ) ? $this->getAssetId( $tx['feeAssetId'] ) : WAVES_ASSET;
$this->appendTS( [
UID => $this->getNewUid(),
TXKEY => $txkey,
TYPE => TX_MATCHER,
A => MATCHER,
B => $this->getRecipientId( $tx['sender'] ),
ASSET => $afee,
AMOUNT => -$fee,
FEEASSET => $afee,
FEE => $fee,
ADDON => 0,
GROUP => FAILED_GROUP,
] );
break;
default:
w8_err( 'processFailedTransaction unknown type: ' . $tx['type'] );
}
Expand Down

0 comments on commit 04b34ea

Please sign in to comment.