removed unnecessary this.query = opts.query from constructor
Created a tx error state for errors in approveTransaction
validateTxParams has been moved to tx-utils
removed "value" arg from _setTxStatus
- Was incorrectly calling some eth-query methods (left over from old local eth-query)
- Was still passing block to getAccount in addAccount
- Now emitting update only after all account balances are loaded, reducing UI update traffic.
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.
It seems `selectedAddress` was removed from the keyring-controller’s state, and is used to populate the injected current account.
I couldn't help myself, I dug around, I found a PR named [changed all instances of selectedAddress to selectedAccount](f5b0795ac5) by @Zanibas. Sorry, Kevin! Had you actually changed all instances, this bug would not have happened.
Fixes#908
Migrator now returns a lostAccount array that includes objects
these objects include keys of address and privateKey,
this allows the MetamaskController to restore the lost accounts
even without customizing the idStore or the KeyringController.
Also includes a patch that allows idStore to synchronously export private keys.