Skip to content
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

Update activate() to return account #593

Open
StKostyantin opened this issue Jun 29, 2022 · 3 comments
Open

Update activate() to return account #593

StKostyantin opened this issue Jun 29, 2022 · 3 comments

Comments

@StKostyantin
Copy link

There are cases when you need to get an account immediately after calling activate(). For example to send the account to some storage or something else and do it without re-rendering.

activate(desiredChainIdOrChainParameters?: number | AddEthereumChainParameter): Promise<account>

@monishski
Copy link

monishski commented Jun 30, 2022

I agree... I had this exact same problem when I wanted to do all of the following in the same lifecycle of the component:

  1. Ask the user to sign a message associated with that account
  2. Add the account on the backend

I am currently working around this by making another ?RPC call?
So const accounts = metaMaskConnector.provider?.request({ method: "eth_accounts" })

@ezerssss
Copy link

No updates on this?

@niZmosis
Copy link

I added this feature in my PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants