Skip to content

Commit

Permalink
Merge branch 'develop' into BCI-2919-Update-FinalityDepth-check-logic…
Browse files Browse the repository at this point in the history
…-on-Head-Tracker
  • Loading branch information
silaslenihan authored May 20, 2024
2 parents 1219f10 + 0d58a8d commit e49ef69
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-squids-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

link transfer status check #bugfix
5 changes: 5 additions & 0 deletions contracts/.changeset/smooth-years-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chainlink/contracts": patch
---

link transfer status check #bugfix
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ contract AutomationRegistryLogicC2_3 is AutomationRegistryBase2_3 {
}

/**
* @notice withdraws LINK received as payment for work performed
* @notice this is for NOPs to withdraw LINK received as payment for work performed
*/
function withdrawPayment(address from, address to) external {
if (to == ZERO_ADDRESS) revert InvalidRecipient();
Expand All @@ -78,7 +78,10 @@ contract AutomationRegistryLogicC2_3 is AutomationRegistryBase2_3 {
uint96 balance = _updateTransmitterBalanceFromPool(from, s_hotVars.totalPremium, uint96(s_transmittersList.length));
s_transmitters[from].balance = 0;
s_reserveAmounts[IERC20(address(i_link))] = s_reserveAmounts[IERC20(address(i_link))] - balance;
i_link.transfer(to, balance);
bool transferStatus = i_link.transfer(to, balance);
if (!transferStatus) {
revert TransferFailed();
}
emit PaymentWithdrawn(from, balance, to, msg.sender);
}

Expand Down

0 comments on commit e49ef69

Please sign in to comment.