Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
peterslany committed Nov 17, 2023
1 parent 63db7b3 commit 2255595
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/swap/Btc_Marketplace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,10 @@ contract BtcMarketPlace {
BitcoinTx.Info calldata transaction
) private {
// Prefixes scriptpubkey with its size to match script output data.
bytes32 b = keccak256(abi.encodePacked(uint8(bitcoinAddress.scriptPubKey.length), bitcoinAddress.scriptPubKey));
bytes32 scriptPubKeyHash =
keccak256(abi.encodePacked(uint8(bitcoinAddress.scriptPubKey.length), bitcoinAddress.scriptPubKey));

uint256 txOutputValue = BitcoinTx.getTxOutputValue(b, transaction.outputVector);
uint256 txOutputValue = BitcoinTx.getTxOutputValue(scriptPubKeyHash, transaction.outputVector);

require(txOutputValue >= expectedBtcAmount, "Bitcoin transaction amount is lower than in accepted order.");
}
Expand Down

0 comments on commit 2255595

Please sign in to comment.