diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-04-11 18:03:58 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-11 18:03:58 +0800 |
commit | b69e8bc4a3525d3911fe4ad5c5130436ff153c4c (patch) | |
tree | 86cb1611d25b0a894a70819596242a8d84c31fd9 | |
parent | 7d3f17c9ab10dadf3600c40b3ad099cc98873ba5 (diff) | |
download | dexon-governance-abi-b69e8bc4a3525d3911fe4ad5c5130436ff153c4c.tar.gz dexon-governance-abi-b69e8bc4a3525d3911fe4ad5c5130436ff153c4c.tar.zst dexon-governance-abi-b69e8bc4a3525d3911fe4ad5c5130436ff153c4c.zip |
contracts: Recovery: remove auto refund mechanism
-rw-r--r-- | contracts/Recovery.sol | 18 |
1 files 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 { |