-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trex 121 recovery function modify #205
Conversation
@@ -268,8 +268,11 @@ contract IdentityRegistry is IIdentityRegistry, AgentRoleUpgradeable, IRStorage | |||
IIdentity _identity, | |||
uint16 _country | |||
) public override onlyAgent { | |||
_tokenIdentityStorage.addIdentityToStorage(_userAddress, _identity, _country); | |||
emit IdentityRegistered(_userAddress, _identity); | |||
IIdentity identity = _tokenIdentityStorage.storedIdentity(_userAddress); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you shouldn't change the registerIdentity method for updating the recovery process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if a wallet is already registered there is a function update to change the OID linked to it, add function shouldn't be used for that
@@ -40,20 +40,6 @@ describe('Token - Recovery', () => { | |||
}); | |||
}); | |||
|
|||
describe('when new wallet is not authorized on the identity', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to test the case in which 2 tokens that are linked to the same IRS are doing the recovery as it is what the bug was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in old implementation it should have worked on the first token and then failed on the second because the Identity Registry storage was already modified by the first recovery.
https://tokeny.atlassian.net/browse/TREX-121