This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always sign transactions and messages with the correct account (#14)
The account used to sign transactions and messages should be the one the transaction or message is from. Instead, the last connected account was being used to sign any messages or transactions. This was especially problematic considering the last connected account was not persisted, meaning that signatures were being performed with the wrong account after a reset (unless the last connected account happened to be account 0, which was the default). A mapping of addresses to indexes as been added to the keyring state, and this mapping has been persisted. This should ensure the correct account index is used, and thus the correct hd path, each time this keyring is used for signing.
- Loading branch information