From 1025eb3b4f90c2b909fe9d238cebba878c8ce2db Mon Sep 17 00:00:00 2001
From: Dan Finlay <dan@danfinlay.com>
Date: Mon, 25 Apr 2016 14:14:34 -0700
Subject: Persist selected account

When selecting an account, we now persist the selection to the `configManager`, so the selection can be restored when re-unlocking Metamask.

Also found the bug where `rawtestrpc` was still being used as a default, and fixed it!
---
 ui/app/reducers/app.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'ui/app/reducers/app.js')

diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index 131b434e9..f522e6042 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -7,12 +7,10 @@ module.exports = reduceApp
 function reduceApp(state, action) {
 
   // clone and defaults
-  var accounts = valuesFor(state.metamask.accounts)
-  var account = accounts.length ? valuesFor(state.metamask.accounts)[0].address : null
   var defaultView = {
     name: 'accountDetail',
     detailView: null,
-    context: account,
+    context: state.metamask.selectedAccount,
   }
 
   // confirm seed words
-- 
cgit v1.2.3