-
Notifications
You must be signed in to change notification settings - Fork 2
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
Wallet provider can change account #124
Comments
Hello @altai0 I'm not sure about what to change. To contextualise: Here how I select an massa station wallet account and create a client: const wallets = await providers();
const massaStationWallet = wallets.find(
(wallet) => wallet.name() === walletName
);
const accounts = await massaStationWallet?.accounts();
// I can store accounts in a state
const account = accounts?.[0];
const client = await ClientFactory.fromWalletProvider(
massaStationWallet!,
account!
); So if I want to change my account I just create a new client with another account, I can display the list so the user can choose. You said myProvider = providers[0]; is to select an account but it's actually to select a provider which can contain multiple accounts. Are we on the same page or am I way off the mark. |
Ok I don't know if it's a related issue but:
So there is 2 behaviours which is a problem. cc @gregLibert |
For privacy reason I think it's better to follow Bearby behaviour. Otherwise malicious websites might be able to link different accounts. |
In the current method we use const myProvider = providers[0]; to select an account. We can make this dynamic. Massa Station Wallet sets a master account and providers returns the master account. For account changes it is necessary to change the main account. We can do this by creating a function in wallet-provider. changeAccount() example.
The text was updated successfully, but these errors were encountered: