aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/account-import-strategies
Commit message (Collapse)AuthorAgeFilesLines
* account-import-strategies - ensure privateKey is prefixed before converting ↵kumavis2018-06-141-2/+3
| | | | to buffer
* Make account import tests much more specificDan Finlay2018-06-121-0/+7
| | | | | However, they no longer seem to work. I'm unclear why this test is failing. The private key being provided should be valid.
* Add validation for importing empty private keyDan Finlay2018-06-061-0/+3
| | | | | | | Previously importing an empty string would result in a new empty Keyring object to be constructed, with no notification to the user. Now we render a clear error explaining the mistake.
* Fix linting warningsThomas Huang2017-04-271-1/+1
|
* Add ability to import v3 JSON walletsDan Finlay2017-01-191-5/+13
| | | | | | | | There is now a menu item labeled "JSON File" for importing, and it can digest either: - v1 MyEtherWallet JSON files - v3 Account files (used by Geth, Mist, and MyEtherWallet). Fixes #715
* Added new modular private key import systemDan Finlay2017-01-191-0/+37
Now any strategy for importing a private key that can be described as a pure function can be very easily turned into a MetaMask import strategy. I've created a generic and reusable UI action called `importNewAccount(strategy, args)`. The `strategy` is a unique identifier defined in `app/scripts/account-import-strategies`, and the `args` will be passed to the member of the `strategies` array whose key matches the strategy string. Strategies return private key hex strings, and are used by the metamask-controller to create a new keyring, and select that new account, before calling back. This also implements @frankiebee's idea of showing the imported account when it's been imported (my oversight!). This commit only moves us to this architecture, keeping feature parity for private key import, but has some untested code for importing geth-style JSON files as well!