Fixes#1021
A top-right menu item now allows `Account Import`. It has a menu (with one item for now) that allows importing a private key string.
Errors are displayed, and a success navigates the user to their account list, where the imported account is labeled `LOOSE`.
Required making the getState methods for both keyringController and metamaskController async.
They both now return promises, and the main metamask-controller.getState method is now nodeified.
Will allow the UI to render loose keys differently than persisted keys.
This is only a bug in dev, but was committed yesterday.
Sometimes the `encrypt` method was being passed values other than the password as the encryption key, leading to un-unlockable vaults.
To find this, and avoid it for all time hereafter, I added several more steps to our oft-neglected integration test suite, which now fully initializes a vault, locks it, and unlocks it again, to make sure all of those steps definitely work always.
Broken in this commit:
bc39cd7b89
Synchronous methods were added to an `async.waterfall` array.
This commit also removes the delegate call checking, since we concluded it was misinformed.
Mostly Fixes#893
A couple methods cache callbacks, and will require a larger refactor to fully denodeify.
Specifically, our methods involving web3 requests to sign a tx, sign a message, and approve or cancel either of those.
I think we should postpone those until the TxManager refactor, since it will likely handle this response caching itself.