From 22555956ef78afe7d4b888d0ab80f722dea2594d Mon Sep 17 00:00:00 2001 From: Peter Date: Fri, 17 Nov 2023 17:07:58 +0100 Subject: [PATCH] chore: cleanup --- src/swap/Btc_Marketplace.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/swap/Btc_Marketplace.sol b/src/swap/Btc_Marketplace.sol index 0bb13d8e..a1d72252 100644 --- a/src/swap/Btc_Marketplace.sol +++ b/src/swap/Btc_Marketplace.sol @@ -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."); }