Skip to content

Commit

Permalink
Bubble up revert data on failed Address.sendValue (#5379)
Browse files Browse the repository at this point in the history
  • Loading branch information
arr00 authored Dec 17, 2024
1 parent fad2b6e commit 73b46e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/cyan-taxis-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---

`Address`: bubble up revert data on `sendValue` failed call
4 changes: 2 additions & 2 deletions contracts/utils/Address.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ library Address {
revert Errors.InsufficientBalance(address(this).balance, amount);
}

(bool success, ) = recipient.call{value: amount}("");
(bool success, bytes memory returndata) = recipient.call{value: amount}("");
if (!success) {
revert Errors.FailedCall();
_revert(returndata);
}
}

Expand Down

0 comments on commit 73b46e3

Please sign in to comment.