When coding an application that looks to be metamask compatible how are multiple account handled by meta mask ? how can i make sure that metamask / my app are in sync account-wise ?
does metamask set the
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
According to Metamask's docs (https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md):
When a user selects an account in MetaMask, that account silently becomes the web3.eth.accounts in your JS context, the only member of the web3.eth.accounts array.
So, by default, anytime you check for web3.eth.accounts it will refer to the currently selected account in Metamask.