From f59256c73ed65990c54b67b4c745a69c104b23f4 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Tue, 7 Feb 2017 14:54:30 -0300 Subject: [PATCH 1/7] Fix URL handler for desktop --- src/js/services/openURL.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/services/openURL.js b/src/js/services/openURL.js index ff01dc78c..7c1af7417 100644 --- a/src/js/services/openURL.js +++ b/src/js/services/openURL.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.services').factory('openURLService', function($rootScope, $ionicHistory, $document, $log, $state, platformInfo, lodash, profileService, incomingData) { +angular.module('copayApp.services').factory('openURLService', function($rootScope, $ionicHistory, $document, $log, $state, platformInfo, lodash, profileService, incomingData, appConfigService) { var root = {}; var handleOpenURL = function(args) { @@ -61,10 +61,10 @@ angular.module('copayApp.services').factory('openURLService', function($rootScop handleOpenURL({ url: pathData.substring(pathData.indexOf('bitcoin:')) }); - } else if (pathData.indexOf('copay:') != -1) { - $log.debug('Copay URL found'); + } else if (pathData.indexOf(appConfigService.name + '://') != -1) { + $log.debug(appConfigService.name + ' URL found'); handleOpenURL({ - url: pathData.substring(pathData.indexOf('copay:')) + url: pathData.substring(pathData.indexOf(appConfigService.name + '://')) }); } }); From 2d3da332c4bf45e9b00013d2a23eba48c3e3e7f0 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 7 Feb 2017 16:13:28 -0500 Subject: [PATCH 2/7] fix storage pull --- src/js/services/storageService.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/js/services/storageService.js b/src/js/services/storageService.js index 5f78725a3..8b3b2618d 100644 --- a/src/js/services/storageService.js +++ b/src/js/services/storageService.js @@ -414,9 +414,9 @@ angular.module('copayApp.services') // } root.removeBitpayDebitCard = function(network, cardEid, cb) { - root.getBitpayAccounts(network, function(err, allAccounts){ + root.getBitpayAccounts(network, function(err, allAccounts) { - lodash.each(allAccounts, function(account){ + lodash.each(allAccounts, function(account) { account.cards = lodash.reject(account.cards, { 'eid': cardEid }); @@ -450,7 +450,10 @@ angular.module('copayApp.services') var allAccounts = {}; try { allAccounts = JSON.parse(allAccountsStr); - } catch (e) {}; + } catch (e) { + $log.error('Bad storage value for bitpayAccount-v2' + allAccountsStr) + return cb(null, {}); + }; var anyMigration; @@ -474,10 +477,10 @@ angular.module('copayApp.services') }); if (anyMigration) { - storage.set('bitpayAccounts-v2-' + network, allAccounts, function(){ + storage.set('bitpayAccounts-v2-' + network, allAccounts, function() { return cb(err, allAccounts); }); - } else + } else return cb(err, allAccounts); }); From 05f10e1135dde597a1504f8d0424950949bc7225 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 7 Feb 2017 16:16:21 -0500 Subject: [PATCH 3/7] fix storage --- src/js/services/storageService.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/services/storageService.js b/src/js/services/storageService.js index 8b3b2618d..668e8c66a 100644 --- a/src/js/services/storageService.js +++ b/src/js/services/storageService.js @@ -447,6 +447,9 @@ angular.module('copayApp.services') storage.get('bitpayAccounts-v2-' + network, function(err, allAccountsStr) { if (err) return cb(err); + if (!allAccountsStr) + return cb(null, {}); + var allAccounts = {}; try { allAccounts = JSON.parse(allAccountsStr); From 6f0ec48af7222f7a40159843b38089ded49cd727 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 7 Feb 2017 16:19:20 -0500 Subject: [PATCH 4/7] v1.3.6 --- app-template/bitpay/appConfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app-template/bitpay/appConfig.json b/app-template/bitpay/appConfig.json index 2bdcef286..1c9decb34 100644 --- a/app-template/bitpay/appConfig.json +++ b/app-template/bitpay/appConfig.json @@ -21,8 +21,8 @@ "windowsAppId": "2d1002d7-ee34-4f60-bd29-0c871ba0c195", "pushSenderId": "1036948132229", "description": "Secure Bitcoin Wallet", - "version": "1.3.5", - "androidVersion": "135000", + "version": "1.3.6", + "androidVersion": "136000", "_extraCSS": null, "_enabledExtensions": { "coinbase": true, From 3f641e3ca3020dc642cb8b91cf3a341ea35ccb0e Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 8 Feb 2017 15:34:59 -0300 Subject: [PATCH 5/7] Removes undefined service --- src/js/services/homeIntegrations.js | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/js/services/homeIntegrations.js diff --git a/src/js/services/homeIntegrations.js b/src/js/services/homeIntegrations.js deleted file mode 100644 index d99588a80..000000000 --- a/src/js/services/homeIntegrations.js +++ /dev/null @@ -1,23 +0,0 @@ - 'use strict'; - angular.module('copayApp.services').factory('', function(configService, $log) { - var root = {}; - var services = []; - - root.register = function(serviceInfo) { - $log.info('Adding homeIntegration entry:' + serviceInfo.name); - services.push(serviceInfo); - }; - - root.unregister = function(serviceName) { - services = lodash.filter(services, function(x) { - return x.name != serviceName - }); - }; - - root.get = function() { - return services; - }; - - return root; - - }); From 9532ba75bdd09239d5abe3cf1360ee53943708db Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 9 Feb 2017 10:55:05 -0300 Subject: [PATCH 6/7] Fix installer name for Windows version --- app-template/setup-win.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-template/setup-win.iss b/app-template/setup-win.iss index b0faaa163..f9dbac910 100755 --- a/app-template/setup-win.iss +++ b/app-template/setup-win.iss @@ -19,7 +19,7 @@ AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={pf}\{#MyAppName} DefaultGroupName={#MyAppName} -OutputBaseFilename=*USERVISIBLENAME*-win +OutputBaseFilename=*USERVISIBLENAME* OutputDir=./ Compression=lzma SolidCompression=yes From d3389eb7b0913531c801101ea2cbf18ba7f93740 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 9 Feb 2017 11:28:21 -0300 Subject: [PATCH 7/7] Show error as an empty string if null --- src/js/controllers/buyAmazon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/controllers/buyAmazon.js b/src/js/controllers/buyAmazon.js index b77fd93d5..ca1ddba94 100644 --- a/src/js/controllers/buyAmazon.js +++ b/src/js/controllers/buyAmazon.js @@ -22,7 +22,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio var showError = function(msg, err) { $scope.sendStatus = ''; $log.error(err); - err = err && err.errors ? err.errors[0].message : err; + err = err && err.errors ? err.errors[0].message : (err || ''); popupService.showAlert(msg, err); };