Skip to content

Commit

Permalink
refactor: standardised private methods in DiscordProvider.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansonhkg committed Jul 10, 2024
1 parent 3f84d9a commit 7ef841f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/lit-auth-client/src/lib/providers/DiscordProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default class DiscordProvider extends BaseProvider {
* @returns {Promise<string>} - Auth method id
*/
public async getAuthMethodId(authMethod: AuthMethod): Promise<string> {
const userId = await this.#fetchDiscordUser(authMethod.accessToken);
const userId = await this._fetchDiscordUser(authMethod.accessToken);
const authMethodId = ethers.utils.keccak256(
ethers.utils.toUtf8Bytes(`${userId}:${this.clientId}`)
);
Expand Down Expand Up @@ -207,7 +207,7 @@ export default class DiscordProvider extends BaseProvider {
*
* @returns {Promise<string>} - Discord user ID
*/
async #fetchDiscordUser(accessToken: string): Promise<string> {
private async _fetchDiscordUser(accessToken: string): Promise<string> {
const meResponse = await fetch('https://discord.com/api/users/@me', {
method: 'GET',
headers: {
Expand Down

0 comments on commit 7ef841f

Please sign in to comment.