-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Showing
1 changed file
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters