Skip to content

Commit 9286391

Browse files
fix: update bal before keeper payment (#2628)
1 parent 82d8685 commit 9286391

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

target_chains/ethereum/contracts/contracts/pulse/Scheduler.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -768,12 +768,13 @@ abstract contract Scheduler is IScheduler, SchedulerState {
768768
revert InsufficientBalance();
769769
}
770770

771-
// Pay keeper and update status if successful
771+
status.balanceInWei -= totalKeeperFee;
772+
status.totalSpent += totalKeeperFee;
773+
774+
// Pay keeper and update status
772775
(bool sent, ) = msg.sender.call{value: totalKeeperFee}("");
773776
if (!sent) {
774777
revert KeeperPaymentFailed();
775778
}
776-
status.balanceInWei -= totalKeeperFee;
777-
status.totalSpent += totalKeeperFee;
778779
}
779780
}

0 commit comments

Comments
 (0)