aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-01-03 09:38:37 +0800
committerDan Finlay <dan@danfinlay.com>2017-01-03 09:38:37 +0800
commitb93cdd428b5013787f78a266bcb5ca84d26b9941 (patch)
tree4b94a71279fd58d4c5d30fd9cb1b62917d629238
parent6b8db04f0f068bc8375ecc22a39987b905a3f82c (diff)
parentaf2c7004b05ad985b9ec8fc16b8bbec1765bf062 (diff)
downloadtangerine-wallet-browser-b93cdd428b5013787f78a266bcb5ca84d26b9941.tar
tangerine-wallet-browser-b93cdd428b5013787f78a266bcb5ca84d26b9941.tar.gz
tangerine-wallet-browser-b93cdd428b5013787f78a266bcb5ca84d26b9941.tar.bz2
tangerine-wallet-browser-b93cdd428b5013787f78a266bcb5ca84d26b9941.tar.lz
tangerine-wallet-browser-b93cdd428b5013787f78a266bcb5ca84d26b9941.tar.xz
tangerine-wallet-browser-b93cdd428b5013787f78a266bcb5ca84d26b9941.tar.zst
tangerine-wallet-browser-b93cdd428b5013787f78a266bcb5ca84d26b9941.zip
Merge remote-tracking branch 'origin/ShowDifferentAccounts' into RevertTxManager
-rw-r--r--app/scripts/keyring-controller.js4
-rw-r--r--app/scripts/keyrings/simple.js9
-rw-r--r--app/scripts/metamask-controller.js1
3 files changed, 7 insertions, 7 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index 857f2e684..92429f7f5 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -95,7 +95,6 @@ module.exports = class KeyringController extends EventEmitter {
isInitialized: (!!wallet || !!vault),
isUnlocked: Boolean(this.password),
isDisclaimerConfirmed: this.configManager.getConfirmedDisclaimer(),
- unconfTxs: this.configManager.unconfirmedTxs(),
transactions: this.configManager.getTxList(),
unconfMsgs: messageManager.unconfirmedMsgs(),
messages: messageManager.getMsgList(),
@@ -111,7 +110,6 @@ module.exports = class KeyringController extends EventEmitter {
})
}
-
// Create New Vault And Keychain
// @string password - The password to encrypt the vault with
//
@@ -510,7 +508,7 @@ module.exports = class KeyringController extends EventEmitter {
if (typeof password === 'string') {
this.password = password
}
- return Promise.all(this.keyrings.map((keyring, i) => {
+ return Promise.all(this.keyrings.map((keyring) => {
return Promise.all([keyring.type, keyring.serialize()])
.then((serializedKeyringArray) => {
// Label the output values on each serialized Keyring:
diff --git a/app/scripts/keyrings/simple.js b/app/scripts/keyrings/simple.js
index 8f339cf80..9717f1c45 100644
--- a/app/scripts/keyrings/simple.js
+++ b/app/scripts/keyrings/simple.js
@@ -19,10 +19,11 @@ class SimpleKeyring extends EventEmitter {
return Promise.resolve(this.wallets.map(w => w.getPrivateKey().toString('hex')))
}
- deserialize (wallets = []) {
- this.wallets = wallets.map((w) => {
- var b = new Buffer(w, 'hex')
- const wallet = Wallet.fromPrivateKey(b)
+ deserialize (privateKeys = []) {
+ this.wallets = privateKeys.map((privateKey) => {
+ const stripped = ethUtil.stripHexPrefix(privateKey)
+ const buffer = new Buffer(stripped, 'hex')
+ const wallet = Wallet.fromPrivateKey(buffer)
return wallet
})
return Promise.resolve()
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 46e093000..3e27272b9 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -69,6 +69,7 @@ module.exports = class MetamaskController {
this.state,
this.ethStore.getState(),
this.configManager.getConfig(),
+ this.txManager.getState(),
keyringControllerState,
this.noticeController.getState(), {
lostAccounts: this.configManager.getLostAccounts(),