-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat/auth #5
Feat/auth #5
Conversation
src/auth/auth.ts
Outdated
} | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove that one.
src/auth/auth.ts
Outdated
* method. | ||
* @returns the result of the `this.sdk.unregisterAuthMethod_mutation` method, which is awaited. | ||
*/ | ||
async unregisterAuthMethod({ data, type }: { data: JSON; type: AuthType }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, instead of JSON, try to type this data.
src/auth/auth.ts
Outdated
* @param - - `authId`: A string representing the ID of the authentication method to be migrated. | ||
* @returns the result of the `migrateAuthMethod` mutation. | ||
*/ | ||
async migrateAuthMethod({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NunoMartins21 Do we need that? What is this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's to migrate an alias from one user to another. It's ok to have it on the SDK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it
src/auth/auth.ts
Outdated
* @param {Chain} chain : a chain optional of type Chain | ||
* @returns the result of the `createWalletNounce` method call, is a message which will be used to confirm wallet. | ||
*/ | ||
async createWalletNounce({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the user needs to open an object for that? change all things like that to pass directly as params
src/auth/auth.ts
Outdated
* @param - - `authId`: A string representing the ID of the authentication method to be migrated. | ||
* @returns the result of the `migrateAuthMethod` mutation. | ||
*/ | ||
async migrateAuthMethod({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it
test/auth.test.ts
Outdated
it( | ||
'create wallet nounce', | ||
async () => { | ||
const { message } = await api.auth.createWalletNounce( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { message } = await api.auth.createWalletNounce( | |
const { message } = await api.auth.createWalletNonce( |
src/auth/auth.ts
Outdated
* @param {Chain} chain : a chain optional of type Chain | ||
* @returns the result of the `createWalletNounce` method call, is a message which will be used to confirm wallet. | ||
*/ | ||
async createWalletNounce(wallet: string, chain?: Chain) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async createWalletNounce(wallet: string, chain?: Chain) { | |
async createWalletNonce(wallet: string, chain?: Chain) { |
Added all methods related to Auth and possible unit test for it