aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/keyring-controller.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-01-18 08:22:22 +0800
committerDan Finlay <dan@danfinlay.com>2017-01-18 08:24:45 +0800
commit1ff4894b674bbcbac1998228454129018e4642b6 (patch)
tree5ddf81cc89253ea6ca8a19f19cee0efe328c2742 /app/scripts/keyring-controller.js
parent958cbfbde44c201cf71f5dfcb7b1748bb43e597f (diff)
downloadtangerine-wallet-browser-1ff4894b674bbcbac1998228454129018e4642b6.tar
tangerine-wallet-browser-1ff4894b674bbcbac1998228454129018e4642b6.tar.gz
tangerine-wallet-browser-1ff4894b674bbcbac1998228454129018e4642b6.tar.bz2
tangerine-wallet-browser-1ff4894b674bbcbac1998228454129018e4642b6.tar.lz
tangerine-wallet-browser-1ff4894b674bbcbac1998228454129018e4642b6.tar.xz
tangerine-wallet-browser-1ff4894b674bbcbac1998228454129018e4642b6.tar.zst
tangerine-wallet-browser-1ff4894b674bbcbac1998228454129018e4642b6.zip
Allow importing of private key strings
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`.
Diffstat (limited to 'app/scripts/keyring-controller.js')
-rw-r--r--app/scripts/keyring-controller.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index 4be00a5a5..e609403cc 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -234,7 +234,10 @@ module.exports = class KeyringController extends EventEmitter {
addNewKeyring (type, opts) {
const Keyring = this.getKeyringClassForType(type)
const keyring = new Keyring(opts)
- return keyring.getAccounts()
+ return keyring.deserialize(opts)
+ .then(() => {
+ return keyring.getAccounts()
+ })
.then((accounts) => {
this.keyrings.push(keyring)
return this.setupAccounts(accounts)