Skip to content

fix(people-lite): reject alias accounts in attest - #19

Open
agustinustheo wants to merge 2 commits into
mainfrom
fix/5-ta-reject-alias-accounts
Open

fix(people-lite): reject alias accounts in attest#19
agustinustheo wants to merge 2 commits into
mainfrom
fix/5-ta-reject-alias-accounts

Conversation

@agustinustheo

Copy link
Copy Markdown
Member

Closes #5

attest only rejected accounts registered as lite people, so an account already bound to a lite alias could also become a canonical lite person.

The call now rejects alias-bound candidates with AccountInUse before registration. A regression test establishes a real alias binding and verifies that attestation leaves the binding and allowance unchanged.

Changes

  • Add the AccountToAlias gate to PeopleLite::attest.
  • Add a regression test for an alias-bound candidate.

@agustinustheo agustinustheo self-assigned this Aug 20, 2026
@agustinustheo
agustinustheo requested a review from a team August 20, 2026 07:44
) -> DispatchResultWithPostInfo {
let verifier = ensure_signed(origin)?;
ensure!(!LitePeople::<T>::contains_key(&candidate), Error::<T>::AlreadyRegistered);
ensure!(!AccountToAlias::<T>::contains_key(&candidate), Error::<T>::AccountInUse);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add it to register_with_fee as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added: 273ea5f

@agustinustheo
agustinustheo force-pushed the fix/5-ta-reject-alias-accounts branch from 09aa847 to 273ea5f Compare August 20, 2026 15:34
@agustinustheo

Copy link
Copy Markdown
Member Author

I force pushed because I rebased with main.

@agustinustheo
agustinustheo enabled auto-merge (squash) August 20, 2026 15:35
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.

People Lite: attest call AccountToAlias gate

2 participants