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

Rename function names in Identity service #1108

Open
0xisk opened this issue Nov 3, 2023 · 0 comments
Open

Rename function names in Identity service #1108

0xisk opened this issue Nov 3, 2023 · 0 comments

Comments

@0xisk
Copy link
Member

0xisk commented Nov 3, 2023

          Lets remove unneeded Identity from names, just `insert`.
  private insert = async (newIdentity: ZkIdentitySemaphore, urlOrigin?: string): Promise<boolean> => {

The same goes for loadIdentities, createIdentity, createIdentityRequest, deleteIdentity, deleteAllIdentities

  private load = async () => {
  
create = async ({
    walletType,
    messageSignature,
    isDeterministic,
    groups,
    urlOrigin,
    options,
  }: INewIdentityRequest): Promise<string | undefined> => {
  
  createRequest = async ({ urlOrigin }: ICreateIdentityRequestArgs): Promise<void> => {
    await this.browserController.openPopup({ params: { redirect: Paths.CREATE_IDENTITY, urlOrigin } });
  };
  
    delete = async ({ identityCommitment }: IDeleteIdentityArgs): Promise<IDeleteIdentityArgs> => {
    
     deleteAll = async (): Promise<boolean> => {

For this one: writeIdentities could be renamed into save

private save = async (identities: Map<string, string>): Promise<void> => {
    const serializedIdentities = JSON.stringify(Array.from(identities.entries()));
    const ciphertext = this.cryptoService.encrypt(serializedIdentities, { mode: ECryptMode.MNEMONIC });
    await this.identitiesStore.set(ciphertext);
  };

Originally posted by @0xisk in #1102 (comment)

@0xisk 0xisk changed the title Remove function names in Identity service Rename function names in Identity service Nov 3, 2023
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

No branches or pull requests

1 participant