From 5761554c39ed7ca78b8c343d8d623b6543b22deb Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Mon, 21 Apr 2014 10:52:15 -0300 Subject: [PATCH 1/3] logo fixes --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index f6b9eb6a9..9b077558b 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@
- + Copay
Wallet ID: {{$root.wallet.id}}
From 9779d5f6df9c66cf576a83cc0537374fa1cdc954 Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Mon, 21 Apr 2014 12:10:34 -0300 Subject: [PATCH 2/3] improving UI and wording for signing page --- Gruntfile.js | 2 +- css/main.css | 5 +++++ index.html | 27 ++++++++++++++------------- js/controllers/signin.js | 3 +++ js/models/core/PrivateKey.js | 3 ++- js/models/core/PublicKeyRing.js | 3 ++- js/models/core/Wallet.js | 12 +----------- 7 files changed, 28 insertions(+), 27 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index b48e9ff1c..3951d93c1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -24,7 +24,7 @@ module.exports = function(grunt) { tasks: ['markdown'] }, scripts: { - files: ['**/*.js', '**/*.html', '!**/node_modules/**', '!browser/bundle.js', '!browser/testdata.js', '!lib/**js', '!browser/vendor-bundle.js', '!js/copayBundle.js'], + files: ['*.js', '**/*.js', '*.html', '!**/node_modules/**', '!lib/**js', '!browser/vendor-bundle.js', '!js/copayBundle.js'], tasks: ['shell'], }, }, diff --git a/css/main.css b/css/main.css index 635c5efb2..869544273 100644 --- a/css/main.css +++ b/css/main.css @@ -245,3 +245,8 @@ button.secondary:hover { background-color: #FFDF00 !important;} .br100 {border-radius: 100%;} +input.ng-dirty.ng-invalid { + border: 2px red solid; +} + + diff --git a/index.html b/index.html index 9b077558b..20de40e1b 100644 --- a/index.html +++ b/index.html @@ -82,18 +82,6 @@ Connecting to wallet...
-
-
-

Join Wallet Creation

- -
-
- -
-
- -
@@ -104,6 +92,19 @@

+
+
+

Join a Wallet in Creation

+ +
+
+ +
+
+ +
Import from file @@ -113,7 +114,7 @@
-

Open Existing Wallet

+

Open Wallet

diff --git a/js/controllers/signin.js b/js/controllers/signin.js index 979cb5f9d..67db9c1a7 100644 --- a/js/controllers/signin.js +++ b/js/controllers/signin.js @@ -19,6 +19,9 @@ console.log('[signin.js.23:walletId:]',walletId); //TODO }; $scope.join = function(secret) { + if (!secret || !secret.length) { + return; + } $scope.loading = true; walletFactory.network.on('joinError', function() { diff --git a/js/models/core/PrivateKey.js b/js/models/core/PrivateKey.js index bf8cfa9de..2002a14b6 100644 --- a/js/models/core/PrivateKey.js +++ b/js/models/core/PrivateKey.js @@ -23,7 +23,8 @@ PrivateKey.prototype.getId = function(prefix) { if (prefix) { buf = Buffer.concat([prefix, buf]); } - return util.ripe160(buf).toString('hex'); + var hash = util.sha256(buf).toString('hex'); + return hash.substring(0, hash.length/2); }; diff --git a/js/models/core/PublicKeyRing.js b/js/models/core/PublicKeyRing.js index a2a26ce58..ee2e74756 100644 --- a/js/models/core/PublicKeyRing.js +++ b/js/models/core/PublicKeyRing.js @@ -82,7 +82,8 @@ PublicKeyRing.prototype.getCopayerId = function(i, prefix) { if (prefix) { buf = Buffer.concat([prefix, buf]); } - return util.ripe160(buf).toString('hex'); + var hash = util.sha256(buf).toString('hex'); + return hash.substring(0, hash.length/2); }; PublicKeyRing.prototype.myCopayerId = function(i, prefix) { diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index eb1b58fc4..e69bc0d6d 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -144,17 +144,7 @@ Wallet.prototype._optsToObj = function () { Wallet.prototype.getPeerId = function(index) { - // if (typeof index === 'undefined') { - // // return my own peerId - // var gen = this.privateKey.getId(idBuf); - // return gen; - // } - // return peer number 'index' peerId - // - var idBuf; -// TODO idBuf DISABLED FOR NOW -//idBuf = new Buffer(this.id); - return this.publicKeyRing.getCopayerId(index || 0, idBuf); + return this.publicKeyRing.getCopayerId(index || 0); }; From bf49f63ad0b41d33a6070cd29e02b38be3de175b Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Mon, 21 Apr 2014 13:04:47 -0300 Subject: [PATCH 3/3] reorg signin divs --- index.html | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/index.html b/index.html index 20de40e1b..4b1f4d651 100644 --- a/index.html +++ b/index.html @@ -92,42 +92,43 @@

-
-
-

Join a Wallet in Creation

- -
-
- -
- -
- -
-
+

Open Wallet

-
- +

+
+
-
- Create a new wallet - Import from file +
+

Join a Wallet in Creation

+
+
+ +
+
+
+
+ +