Skip to content
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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

mplelis
Copy link
Contributor

@mplelis mplelis commented Jun 18, 2024

@mplelis mplelis changed the base branch from main to develop June 18, 2024 22:42
@@ -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);
Copy link
Collaborator

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

Copy link
Collaborator

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', () => {
Copy link
Collaborator

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.

Copy link
Collaborator

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.

@Joachim-Lebrun Joachim-Lebrun changed the base branch from develop to v4.2.0-beta1 June 20, 2024 11:43
Base automatically changed from v4.2.0-beta1 to develop June 27, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants