Skip to content

Commit

Permalink
Addressed unchecked return value in AllowanceCrowdsale OpenZeppelin#945
Browse files Browse the repository at this point in the history
… using SafeERC20 (OpenZeppelin#946)

* addressed unchecked return value in AllowanceCrowdsale OpenZeppelin#945 using SafeERC20
  • Loading branch information
Doug Crescenzi authored and shrugs committed Jun 9, 2018
1 parent 7a61371 commit 39385f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contracts/crowdsale/emission/AllowanceCrowdsale.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ pragma solidity ^0.4.23;

import "../Crowdsale.sol";
import "../../token/ERC20/ERC20.sol";
import "../../token/ERC20/ERC20Basic.sol";
import "../../token/ERC20/SafeERC20.sol";
import "../../math/SafeMath.sol";


/**
* @title AllowanceCrowdsale
* @dev Extension of Crowdsale where tokens are held by a wallet, which approves an allowance to the crowdsale.
*/
contract AllowanceCrowdsale is Crowdsale {
using SafeMath for uint256;
using SafeERC20 for ERC20;

address public tokenWallet;

Expand Down Expand Up @@ -42,6 +43,6 @@ contract AllowanceCrowdsale is Crowdsale {
)
internal
{
token.transferFrom(tokenWallet, _beneficiary, _tokenAmount);
token.safeTransferFrom(tokenWallet, _beneficiary, _tokenAmount);
}
}

0 comments on commit 39385f9

Please sign in to comment.