From 60aaa6bd4ceb245cfc5a5bc74e8c2e31a1e5675b Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 6 Dec 2014 18:26:46 -0300 Subject: [PATCH 01/13] New release v0.8.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8d19cc16c..fb3a61168 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "copay", "description": "A multisignature wallet", "author": "BitPay", - "version": "0.8.2", + "version": "0.8.3", "keywords": [ "wallet", "copay", From 8aa4d93f8f8eb3c06ec1fd3c8573a3e356386e08 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 6 Dec 2014 18:50:27 -0300 Subject: [PATCH 02/13] fixes https://github.com/bitpay/copay/issues/2007 --- cordova/config.xml | 4 ++-- js/init.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cordova/config.xml b/cordova/config.xml index 44ddd11f9..6788e1a9f 100644 --- a/cordova/config.xml +++ b/cordova/config.xml @@ -1,8 +1,8 @@ + ios-CFBundleVersion="0.8.3"> Copay A secure bitcoin wallet for friends and companies. diff --git a/js/init.js b/js/init.js index 3f4432b38..31feed295 100644 --- a/js/init.js +++ b/js/init.js @@ -20,6 +20,10 @@ angular.element(document).ready(function() { startAngular(); }, false); + + document.addEventListener('pause', function() { + window.location = '#!'; + }); } else { startAngular(); } From c8c82b3cb5b9be1f85f8839c349397a153a86edf Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 6 Dec 2014 19:16:50 -0300 Subject: [PATCH 03/13] fix order when there are errors on funnel --- js/controllers/createProfile.js | 3 +- js/util/crypto.js | 2 +- views/createProfile.html | 51 +++++++++++++++++---------------- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/js/controllers/createProfile.js b/js/controllers/createProfile.js index 26d63ed38..b54f78c44 100644 --- a/js/controllers/createProfile.js +++ b/js/controllers/createProfile.js @@ -6,7 +6,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun $scope.init = function() { identityService.goWalletHome(); - $scope.isMobile = isMobile.any(); + $scope.isMobile = 1; //isMobile.any(); $scope.createStep = 'storage'; $scope.useLocalstorage = false; @@ -111,6 +111,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun var msg = err.toString(); if (msg.indexOf('EEXIST') >= 0 || msg.indexOf('BADC') >= 0) { msg = 'This profile already exists' + $scope.createStep = 'email'; } $scope.error = msg; } else { diff --git a/js/util/crypto.js b/js/util/crypto.js index 72679f18f..88c821363 100644 --- a/js/util/crypto.js +++ b/js/util/crypto.js @@ -76,7 +76,7 @@ module.exports = { try { return sjcl.decrypt(key, sjclEncryptedJson); } catch (e) { - log.info('Decryption failed due to error: ' + e.message); + log.debug('Decryption failed due to error: ' + e.message); return null; } } diff --git a/views/createProfile.html b/views/createProfile.html index b0c285d31..8c1bef967 100644 --- a/views/createProfile.html +++ b/views/createProfile.html @@ -23,9 +23,34 @@
Copay -
+ +
+ clipo +
+ +
+
+ clipo +
+
+ clipo +
+

Creating in the cloud

+

Creating on this device

+
+ +
+
+ clipo +
+ +

Creating on this device

+

Creating in the cloud

+
{{userOrEmail}}
+
+
@@ -37,10 +62,7 @@
-
- clipo -
- + In the Cloud
@@ -106,16 +128,6 @@
-
- clipo -
-
- clipo -
- -

Creating in the cloud

-

Creating on this device

-
@@ -154,15 +166,6 @@
-
- clipo -
- -

Creating on this device

-

Creating in the cloud

-
{{userOrEmail}}
- -
From 4d040e600db7a4b79ab073b431abf657ca7e988c Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 6 Dec 2014 19:56:51 -0300 Subject: [PATCH 04/13] fixes in mobile layout --- cordova/ios/Copay-Info.plist | 4 ++-- js/controllers/createProfile.js | 3 ++- js/controllers/settings.js | 2 +- views/home.html | 3 +-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cordova/ios/Copay-Info.plist b/cordova/ios/Copay-Info.plist index 82021dce2..52030f728 100644 --- a/cordova/ios/Copay-Info.plist +++ b/cordova/ios/Copay-Info.plist @@ -57,11 +57,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - vRC0.9.0 + 0.8.3 CFBundleSignature ???? CFBundleVersion - vRC0.9.0 + 0.8.3 LSRequiresIPhoneOS NSMainNibFile diff --git a/js/controllers/createProfile.js b/js/controllers/createProfile.js index b54f78c44..c3a7900eb 100644 --- a/js/controllers/createProfile.js +++ b/js/controllers/createProfile.js @@ -6,7 +6,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun $scope.init = function() { identityService.goWalletHome(); - $scope.isMobile = 1; //isMobile.any(); + $scope.isMobile = isMobile.any(); $scope.createStep = 'storage'; $scope.useLocalstorage = false; @@ -75,6 +75,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun $scope.userOrEmail = $scope.useLocalstorage ? form.username.$modelValue : form.email.$modelValue; preconditions.checkState($scope.userOrEmail); + $scope.error = null; $scope.createStep = 'pass'; $timeout(function() { $scope.$digest(); diff --git a/js/controllers/settings.js b/js/controllers/settings.js index 9a0a93fd4..3c09a26e9 100644 --- a/js/controllers/settings.js +++ b/js/controllers/settings.js @@ -21,7 +21,7 @@ angular.module('copayApp.controllers').controller('SettingsController', function name: 'In the cloud (Insight server)', pluginName: 'EncryptedInsightStorage', }, { - name: 'In this device (localstorage)', + name: 'On this device (localstorage)', pluginName: 'EncryptedLocalStorage', }, // { diff --git a/views/home.html b/views/home.html index a166c3651..5628ab123 100644 --- a/views/home.html +++ b/views/home.html @@ -23,7 +23,7 @@
Copay -
+
@@ -115,7 +115,6 @@
clipo
-

Sign in to Copay

From 984a7a66510a5bd39a01bba9de2823abef5daa34 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 6 Dec 2014 21:07:26 -0300 Subject: [PATCH 05/13] fix reload in cordova --- js/controllers/createProfile.js | 2 ++ js/controllers/head.js | 1 - js/controllers/home.js | 2 +- js/controllers/sidebar.js | 1 - js/services/applicationService.js | 28 +++++++++++++++++----------- js/services/identityService.js | 2 ++ 6 files changed, 22 insertions(+), 14 deletions(-) diff --git a/js/controllers/createProfile.js b/js/controllers/createProfile.js index c3a7900eb..bd857cd46 100644 --- a/js/controllers/createProfile.js +++ b/js/controllers/createProfile.js @@ -158,6 +158,8 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun return; } $scope.saveSettings(function(err) { + preconditions.checkState(!err,err); + $scope._doCreateProfile($scope.userOrEmail, form.password.$modelValue, function(err) { $timeout(function() { form.password.$setViewValue(''); diff --git a/js/controllers/head.js b/js/controllers/head.js index 4d32b7331..a2b2e40db 100644 --- a/js/controllers/head.js +++ b/js/controllers/head.js @@ -15,7 +15,6 @@ angular.module('copayApp.controllers').controller('HeadController', function($sc }; $scope.signout = function() { - $rootScope.signingOut = true; identityService.signout(); }; diff --git a/js/controllers/home.js b/js/controllers/home.js index 9d0285644..edb25082e 100644 --- a/js/controllers/home.js +++ b/js/controllers/home.js @@ -114,7 +114,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc pinService.clear(function() { copay.logger.debug('PIN erased'); delete $rootScope['hasPin']; - applicationService.reload(); + applicationService.restart(); }); }; diff --git a/js/controllers/sidebar.js b/js/controllers/sidebar.js index 52c1f04d2..b14d23d93 100644 --- a/js/controllers/sidebar.js +++ b/js/controllers/sidebar.js @@ -27,7 +27,6 @@ angular.module('copayApp.controllers').controller('SidebarController', function( }]; $scope.signout = function() { - $rootScope.signingOut = true; identityService.signout(); }; diff --git a/js/services/applicationService.js b/js/services/applicationService.js index 4c3bade19..80a2cc02c 100644 --- a/js/services/applicationService.js +++ b/js/services/applicationService.js @@ -1,22 +1,28 @@ 'use strict'; angular.module('copayApp.services') - .factory('applicationService', function() { + .factory('applicationService', function($rootScope, $location, $timeout) { var root = {}; var isChromeApp = window.chrome && chrome.runtime && chrome.runtime.id; root.restart = function() { - - // Go home reloading the application - var hashIndex = window.location.href.indexOf('#!/'); - if (isChromeApp) { - chrome.runtime.reload(); + if (window.cordova !== undefined) { + $rootScope.iden = $rootScope.wallet = undefined; + // NOP. no need to restart on cordova apps. + $location.path('/'); + $timeout(function(){ + $rootScope.$digest(); + },1); + } else { - window.location = window.location.href.substr(0, hashIndex); - } - }; - root.reload = function() { - window.location.reload(); + // Go home reloading the application + var hashIndex = window.location.href.indexOf('#!/'); + if (isChromeApp) { + chrome.runtime.reload(); + } else { + window.location = window.location.href.substr(0, hashIndex); + } + } }; return root; diff --git a/js/services/identityService.js b/js/services/identityService.js index 1c9c14468..d949bffc7 100644 --- a/js/services/identityService.js +++ b/js/services/identityService.js @@ -328,10 +328,12 @@ angular.module('copayApp.services') }; root.signout = function() { + $rootScope.signingOut = true; if ($rootScope.iden) { $rootScope.iden.store({ noWallets: true }, function() { + $rootScope.signingOut = false; $rootScope.iden.close(); }); } From 4dfc1f9559940aa667f0f5d0d12952e94ddc9f43 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 6 Dec 2014 22:40:36 -0300 Subject: [PATCH 06/13] change iter to 5000 --- config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.js b/config.js index 57f24538d..3113c9b8e 100644 --- a/config.js +++ b/config.js @@ -42,7 +42,7 @@ var defaultConfig = { // local encryption/security config passphraseConfig: { - iterations: 1000, + iterations: 5000, storageSalt: 'mjuBtGybi/4=', }, From a115a6d17a9436742b9f8506a9fc10d77f2cb6c3 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 6 Dec 2014 22:41:03 -0300 Subject: [PATCH 07/13] fixing application reload --- index.html | 6 +++--- js/services/applicationService.js | 2 +- package.json | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 73e813b51..a5b0bd472 100644 --- a/index.html +++ b/index.html @@ -62,7 +62,7 @@
-
+
@@ -73,11 +73,11 @@
-