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

Metamask - Accounts List Length Always 1 #51

Closed
u382514 opened this issue Jun 17, 2022 · 4 comments
Closed

Metamask - Accounts List Length Always 1 #51

u382514 opened this issue Jun 17, 2022 · 4 comments

Comments

@u382514
Copy link

u382514 commented Jun 17, 2022

Trying to get a list of accounts when connecting to Metamask. The list always returns the current account that is selected in Metamask, however not all of the accounts. Is this just a Metamask thing or am I missing something? We're implementing a sign-on feature using wallet connect where we would like them to select the account they want to use as their sign on, and on subsequent sign-on's, allow them to see their 'last sign on address'.

@RootSoft
Copy link
Owner

This should be a MM issue. Can you try with another wallet and see if it's the same results?

@u382514
Copy link
Author

u382514 commented Jun 28, 2022

Well, that would be my next question. I have Pera, Trust and Metamask installed on the phone (IOS). I use URL Launcher in the onDisplayUri function. It always defaults to opening Metamask. How does one open up a different wallet using this method?

@u382514
Copy link
Author

u382514 commented Jun 28, 2022

Forget about that last question. I just needed extra time to understand how all of this works. I have been able to connect to other wallets however it seems to still only bring over the 'current' selected account rather than a full list. At this stage though I need to do more due diligence and connect to a variety of wallets before considering this an issue. Thanks!

@RootSoft
Copy link
Owner

RootSoft commented Jun 28, 2022

@u382514 this might be what your after. https://pub.dev/packages/walletconnect_qrcode_modal_dart.

Note that in the case of Pera (not sure about MM), some wallets lets you only 'select' one account, and that account gets returned in the array. Other wallets might return the entire list of addresses. It depends on the implementation on the wallet.

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

2 participants