-
Notifications
You must be signed in to change notification settings - Fork 133
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
docs: update the magic docs to highlight signer creation is async #170
Conversation
export const magicClient = createWalletClient({ | ||
transport: custom(magic.rpcProvider), |
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 one doesn't work? did not look into magic code, but why is getting rpc provider async here?
hmm, and just using rpcProvider field directly seems to work fine on examples I tried.
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 I'm not sure why this didn't work for a customer... maybe it was because you have to authenticate with a user first?
lemme take another pass at this and make it even more clear that authentication is required first
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.
in the unauthed case .rpcProvider
was returning undefined
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.
hmm I didn't need to do this if I mapped the magicClient to any
for the new WalletClientSigner below:
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.
unblocking, but yeah curious why it needs to be async
needs to be async because the method to auth with magic is async. if you don't auth first then you get errors when connecting the account and using it. to make it simpler, I think we should just recommend that people auth first before connecting |
* docs: update the magic docs to highlight signer creation is async * docs: update the magic docs to highlight signer creation is async
* docs: update the magic docs to highlight signer creation is async * docs: update the magic docs to highlight signer creation is async
* docs: update the magic docs to highlight signer creation is async * docs: update the magic docs to highlight signer creation is async
* docs: update the magic docs to highlight signer creation is async * docs: update the magic docs to highlight signer creation is async
* docs: update the magic docs to highlight signer creation is async * docs: update the magic docs to highlight signer creation is async
* docs: update the magic docs to highlight signer creation is async * docs: update the magic docs to highlight signer creation is async
* docs: update the magic docs to highlight signer creation is async * docs: update the magic docs to highlight signer creation is async
PR-Codex overview
Detailed summary
This PR focuses on updating the
magicSigner
import and usage in the code. The notable changes include:magicSigner
tocreateMagicSigner
owner
assignment to useawait createMagicSigner()
instead ofmagicSigner
createMagicSigner
that authenticates the user and creates aWalletClientSigner
object using themagic
SDK andmagicClient