-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add SECP256k1 Authenticator #78
Conversation
🦋 Changeset detectedLatest commit: 5f28fb9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Signed-off-by: Burnt Val <[email protected]>
…js into feat/add-authenticators
Add ability to create accounts with Keplr as the first auth method. |
Signed-off-by: Burnt Val <[email protected]>
Signed-off-by: Burnt Val <[email protected]>
@@ -35,33 +46,25 @@ export const useAbstraxionAccount = () => { | |||
const refreshConnectionType = () => { | |||
if (session) { | |||
setConnectionType("stytch"); | |||
} else if (data) { | |||
} else if (isConnected) { | |||
// Is this the right conditional |
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.
is this still an open question?
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.
This gets cleaned up in the eth authenticator PR, but this does work for this PR
? decodeJwt(session_jwt) | ||
: { aud: undefined, sub: undefined }; | ||
|
||
// TODO: More robust |
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.
what is the robustness issue here?
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.
I might've just forgotten to delete this comment
|
||
const jwtClient = await AAClient.connectWithSigner( | ||
if (!signer) { | ||
// TODO: More robust edge handling |
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.
anything we can do here? at least log?
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.
Yea we can log, the worst case is that the transactions just fail
} | ||
|
||
// Always returning the first one found because this query should only return an array of 1 | ||
return ( |
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.
can we log when this isn't 1, since it is unexpected behavior
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.
I might actually be able to change the query so that it doesn't return an array, but if I can't then I'll just log this out
This PR aims to introduce the ability to add a secp256k1 authenticator (via Keplr) and use it as a signer for transactions.
Although this functionally works, there are some points of consideration for the future, most in the form of "TODO" comments throughout the code, for instance in the useAbstraxionSigningClient hook. These can all be implemented as we scale towards multiple authenticators