Skip to content

Commit 617cd95

Browse files
committed
refactor: better contract comparation
1 parent 8330494 commit 617cd95

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

contracts/src/core/AlignedLayerServiceManager.sol

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,8 @@ contract AlignedLayerServiceManager is
215215
uint256 txCost = (initialGasLeft - gasleft() + 70_000) * tx.gasprice;
216216

217217
// limit amount to spend is respondToTaskFeeLimit
218-
// transferAmount = if txCost > currentBatch.respondToTaskFeeLimit -> currentBatch.respondToTaskFeeLimit; else -> txCost
219-
uint256 transferAmount = txCost > currentBatch.respondToTaskFeeLimit ?
220-
currentBatch.respondToTaskFeeLimit : txCost;
218+
uint256 transferAmount = txCost < currentBatch.respondToTaskFeeLimit ?
219+
txCost : currentBatch.respondToTaskFeeLimit;
221220

222221
batchersBalances[senderAddress] -= transferAmount;
223222

0 commit comments

Comments
 (0)