Create a New Wallet
diff --git a/js/controllers/signin.js b/js/controllers/signin.js
index 2e571f328..357cc7acc 100644
--- a/js/controllers/signin.js
+++ b/js/controllers/signin.js
@@ -10,7 +10,8 @@ angular.module('copay.signin').controller('SigninController',
$scope.loading = false;
$scope.walletIds = walletFactory.getWalletIds();
- $scope.selectedWalletId = $scope.walletIds?$scope.walletIds.shift():null;
+
+ $scope.selectedWalletId = $scope.walletIds.length ? $scope.walletIds[0]:null;
$scope.create = function() {
$location.path('setup');
diff --git a/js/models/storage/LocalPlain.js b/js/models/storage/LocalPlain.js
index d32234899..d5434f91b 100644
--- a/js/models/storage/LocalPlain.js
+++ b/js/models/storage/LocalPlain.js
@@ -54,13 +54,17 @@ Storage.prototype.remove = function(walletId, k) {
Storage.prototype.getWalletIds = function() {
var walletIds = [];
+ var uniq = {};
for (var i = 0; i < localStorage.length; i++) {
var key = localStorage.key(i);
var split = key.split('::');
if (split.length == 2) {
var walletId = split[0];
- walletIds.push(walletId);
+ if (typeof uniq[walletId] === 'undefined' ) {
+ walletIds.push(walletId);
+ uniq[walletId] = 1;
+ }
}
}