From 86dd249b26b33888607f66b1871eeea9b0f6895a Mon Sep 17 00:00:00 2001 From: Ricardo Guilherme Schmidt <3esmit@gmail.com> Date: Wed, 9 May 2018 01:48:51 -0300 Subject: [PATCH] improve recovery call names and lock actions --- contracts/identity/Identity.sol | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contracts/identity/Identity.sol b/contracts/identity/Identity.sol index d3f4f9c..b7fb70d 100644 --- a/contracts/identity/Identity.sol +++ b/contracts/identity/Identity.sol @@ -283,16 +283,18 @@ contract Identity is ERC725, ERC735, MessageSigned { // Recovery methods //////////////// - function managerReset(bytes32 _newKey) + function recoveryReset(bytes32 _newKey) public recoveryOnly { recoveryManager = _newKey; - _addKey(keccak256(recoveryManager), MANAGEMENT_KEY, 0); + _addKey(_newKey, ACTION_KEY, 0); + purposeThreshold[ACTION_KEY] = keysByPurpose[MANAGEMENT_KEY].length; + _addKey(_newKey, MANAGEMENT_KEY, 0); purposeThreshold[MANAGEMENT_KEY] = keysByPurpose[MANAGEMENT_KEY].length; } - function processManagerReset(uint256 _limit) + function processRecoveryReset(uint256 _limit) public { require(recoveryManager != 0);