Skip to content

Cleanup membershp module #93

@bedeho

Description

@bedeho

Both module storage and interface need to be cleaned up.

The storage and forum client modules need the old interface, and thus storage model, to work, so we have postponed.

  1. Drop storage fields
pub MemberIdsByRootAccountId get(member_ids_by_root_account_id) : map T::AccountId => Vec<T::MemberId>;

// Mapping of a controller account id to vector of member ids it controls
pub MemberIdsByControllerAccountId get(member_ids_by_controller_account_id) : map T::AccountId => Vec<T::MemberId>;

and all modules that depend on them.

  1. No method shall identify members through accounts, but we can have checker methods (return bool) that can verify the validity of a provided account.

  2. Change Profile to Membership, and storage field MemberProfile to MembershipById. Its far less confusing.

  3. MembersCreated => NextMemberId

  4. Handles => MemberIdByHandle

  5. Drop UserInfo, does nothing.

  6. Drop Option wrapper for around value types of maps, e.g. MemberProfile.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions