Skip to content

Commit

Permalink
chore: removed email nounce method
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth9890 committed Nov 13, 2023
1 parent 8879430 commit b47949b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
16 changes: 1 addition & 15 deletions src/auth/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AddWalletConfirmationInput, Sdk } from '../../.mesh';
import { AddWalletConfirmationInput, Sdk, User } from '../../.mesh';
import { AuthType, Chain } from '../types';
import { errorHandler } from '../utils/errorHandler';

Expand Down Expand Up @@ -113,20 +113,6 @@ export class Auth {
}
}

/**
* The function `createEmailNounce` takes an email to create a nounce
* @param {string} email: a string representing the email
* @returns the result of the `createEmailNounce` method call,returning the code and email
*/
async createEmailNounce(email: string) {
try {
return (await this.sdk.createEmailNonce_mutation({ input: { email } }))
.createEmailNonce;
} catch (error) {
throw new Error(errorHandler(error));
}
}

/**
* The function `deleteAccount` takes an id to soft delete the account
* @param {string} id: a string representing the user id
Expand Down
10 changes: 0 additions & 10 deletions test/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,4 @@ describe('auth test', () => {
},
DEFAULT_TIMEOUT,
);

it(
'create email nounce',
async () => {
const { email, code } = await api.auth.createEmailNounce('sid@test.com');
expect(email).toBe('sid@test.com');
expect(code).toBeGreaterThan(1);
},
DEFAULT_TIMEOUT,
);
});

0 comments on commit b47949b

Please sign in to comment.