From b69e8bc4a3525d3911fe4ad5c5130436ff153c4c Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Thu, 11 Apr 2019 18:03:58 +0800 Subject: contracts: Recovery: remove auto refund mechanism --- contracts/Recovery.sol | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/contracts/Recovery.sol b/contracts/Recovery.sol index cf708eb..4b28b7a 100644 --- a/contracts/Recovery.sol +++ b/contracts/Recovery.sol @@ -7,29 +7,15 @@ contract Recovery is Ownable { mapping(uint256 => address[]) public votes; mapping(uint256 => mapping(address => bool)) public voted; - mapping(address => uint256) public withdrawable; event VotedForRecovery(uint256 indexed height, address voter); - event Withdrawn(address indexed owner, uint256 amount); function setDeposit(uint256 DepositValue) public onlyOwner { depositValue = DepositValue; } - function refund(uint256 height, uint256 value) public onlyOwner { - for (uint i = 0; i < votes[height].length; i++) { - withdrawable[votes[height][i]] += value; - } - } - - function withdraw() public { - require(withdrawable[msg.sender] > 0); - - uint256 amount = withdrawable[msg.sender]; - withdrawable[msg.sender] = 0; - msg.sender.transfer(amount); - - emit Withdrawn(msg.sender, amount); + function withdraw() public onlyOwner { + msg.sender.transfer(address(this).balance); } function voteForSkipBlock(uint256 height) public payable { -- cgit v1.2.3