synpress
synpress copied to clipboard
[💡 Feature]: Autoconnect a newly switched account to the dapp if one was connected previously
Is your feature request related to a problem?
With metamask, with one account connected to a dApp it's possible to connect another account straight away, specifically replacing the previous account with a new one.
https://github.com/Synthetixio/synpress/assets/35642018/26eb57eb-b2fd-4501-bdcf-914072f11e43
But apparently, it's not available to do with Synpress.
Such specifically blocks me from testing the dApp behaviour when an account is replaced
Describe the solution you'd like.
Adding a parameter that would control the account replacement behaviour would be nice to have within the switchMetamaskAccount function.
Current API:
switchMetamaskAccount(
accountNameOrAccountNumber: string | number,
): Chainable<boolean>;
Proposed API:
switchMetamaskAccount(
accountNameOrAccountNumber: string | number,
autoConnect?: boolean
): Chainable<boolean>;
Describe alternatives you've considered.
No response
Additional context
No response
i'm facing same issue, any resolve have?