diff --git a/contracts/ownership/CanReclaimToken.sol b/contracts/ownership/CanReclaimToken.sol index f057d4394..4921b7c49 100644 --- a/contracts/ownership/CanReclaimToken.sol +++ b/contracts/ownership/CanReclaimToken.sol @@ -13,12 +13,11 @@ contract CanReclaimToken is Ownable { /** * @dev Reclaim all ERC20Basic compatible tokens - * @param tokenAddr address The address of the token contract + * @param token ERC20Basic The address of the token contract */ - function reclaimToken(address tokenAddr) external onlyOwner { - ERC20Basic tokenInst = ERC20Basic(tokenAddr); - uint256 balance = tokenInst.balanceOf(this); - tokenInst.transfer(owner, balance); + function reclaimToken(ERC20Basic token) external onlyOwner { + uint256 balance = token.balanceOf(this); + token.transfer(owner, balance); } } \ No newline at end of file diff --git a/test/CanReclaimToken.js b/test/CanReclaimToken.js index 01378630e..b8efceea4 100644 --- a/test/CanReclaimToken.js +++ b/test/CanReclaimToken.js @@ -8,7 +8,7 @@ contract('CanReclaimToken', function(accounts) { let token = null; let canReclaimToken = null; - beforeEach(async () => { + beforeEach(async function() { // Create contract and token token = await BasicTokenMock.new(accounts[0], 100); canReclaimToken = await CanReclaimToken.new();