Commit 51906bae by SylTi

refactor

parent 406004a9
......@@ -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
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment