diff --git a/index.html b/index.html index 8ebc2f12c..d10b58a89 100644 --- a/index.html +++ b/index.html @@ -51,6 +51,17 @@ Dismiss + +
+ +

+ NOTE: Your wallet is not complete yet. + {{$root.wallet.publicKeyRing.totalCopayers - $root.wallet.publicKeyRing.registeredCopayers() }} keys are missing. Ask your copayers to join your session: {{$root.wallet.network.peerId}} + +

+
+ +
@@ -64,17 +75,6 @@ Connecting to wallet...
-
-
-

Open a Existing Wallet

- -
-
- -
-
-

Join a Network Wallet

@@ -84,15 +84,44 @@
+
-
-
-

Create a New Wallet

+
+
+
+

Create a New Wallet

+
+
+ +
-
- +
+
+
+
+
+

Open a Existing Wallet

+ +
+
+ +
+
+ +
+
+
@@ -127,6 +156,11 @@
+
+
+ Go back +
+
@@ -143,28 +177,23 @@

-
-

Copayers ({{$root.wallet.network.connectedPeers.length}}/{{$root.wallet.publicKeyRing.requiredCopayers}})

+

Online Copayers: {{$root.wallet.network.connectedPeers.length}}

+ +

+ {{$root.wallet.publicKeyRing.requiredCopayers}} copayers needed for signning transactions + +

-
- -
@@ -309,6 +338,17 @@ +
+
+

+ [DEBUG] WalletId: {{$root.wallet.id}} +

+
+ + diff --git a/js/controllers/signin.js b/js/controllers/signin.js index a636dbab2..357cc7acc 100644 --- a/js/controllers/signin.js +++ b/js/controllers/signin.js @@ -9,11 +9,9 @@ angular.module('copay.signin').controller('SigninController', // $rootScope.peerId = peerData ? peerData.peerId : null; $scope.loading = false; - $scope.selectedWalletId = false; + $scope.walletIds = walletFactory.getWalletIds(); - $scope.listWalletIds = function() { - return walletFactory.getWalletIds(); - }; + $scope.selectedWalletId = $scope.walletIds.length ? $scope.walletIds[0]:null; $scope.create = function() { $location.path('setup'); diff --git a/js/models/core/WalletFactory.js b/js/models/core/WalletFactory.js index a871b4968..bd87ec1fd 100644 --- a/js/models/core/WalletFactory.js +++ b/js/models/core/WalletFactory.js @@ -156,7 +156,6 @@ WalletFactory.prototype.openRemote = function(peedId) { opts.totalCopayers = totalCopayers; var w = new Wallet(opts); w.store(); - this.addWalletId(w.id); return w; }; 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; + } } }