Skip to content

Commit

Permalink
Merge pull request #227 from sablier-labs/fix/use-safe-transfer-from
Browse files Browse the repository at this point in the history
Use safeTransferFrom in _handleTransfer function
  • Loading branch information
andreivladbrg authored Dec 4, 2023
2 parents 2a426ab + 4ad0d71 commit 6bd5388
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SablierV2Batch.sol
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ contract SablierV2Batch is ISablierV2Batch {
/// @dev Helper function to transfer assets from the caller to the batch contract and approve the Sablier contract.
function _handleTransfer(address sablierContract, IERC20 asset, uint256 amount) internal {
// Transfer the assets to the batch contract.
asset.transferFrom({ from: msg.sender, to: address(this), amount: amount });
asset.safeTransferFrom({ from: msg.sender, to: address(this), value: amount });

// Approve the Sablier contract to spend funds.
_approve(sablierContract, asset, amount);
Expand Down
Loading

0 comments on commit 6bd5388

Please sign in to comment.