Merge branch 'master' into feat/bitpay-accounts
This commit is contained in:
commit
7a2d386f34
6 changed files with 19 additions and 36 deletions
|
|
@ -21,8 +21,8 @@
|
||||||
"windowsAppId": "2d1002d7-ee34-4f60-bd29-0c871ba0c195",
|
"windowsAppId": "2d1002d7-ee34-4f60-bd29-0c871ba0c195",
|
||||||
"pushSenderId": "1036948132229",
|
"pushSenderId": "1036948132229",
|
||||||
"description": "Secure Bitcoin Wallet",
|
"description": "Secure Bitcoin Wallet",
|
||||||
"version": "1.3.5",
|
"version": "1.3.6",
|
||||||
"androidVersion": "135000",
|
"androidVersion": "136000",
|
||||||
"_extraCSS": null,
|
"_extraCSS": null,
|
||||||
"_enabledExtensions": {
|
"_enabledExtensions": {
|
||||||
"coinbase": true,
|
"coinbase": true,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ AppSupportURL={#MyAppURL}
|
||||||
AppUpdatesURL={#MyAppURL}
|
AppUpdatesURL={#MyAppURL}
|
||||||
DefaultDirName={pf}\{#MyAppName}
|
DefaultDirName={pf}\{#MyAppName}
|
||||||
DefaultGroupName={#MyAppName}
|
DefaultGroupName={#MyAppName}
|
||||||
OutputBaseFilename=*USERVISIBLENAME*-win
|
OutputBaseFilename=*USERVISIBLENAME*
|
||||||
OutputDir=./
|
OutputDir=./
|
||||||
Compression=lzma
|
Compression=lzma
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
|
||||||
var showError = function(msg, err) {
|
var showError = function(msg, err) {
|
||||||
$scope.sendStatus = '';
|
$scope.sendStatus = '';
|
||||||
$log.error(err);
|
$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);
|
popupService.showAlert(msg, err);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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 root = {};
|
||||||
|
|
||||||
var handleOpenURL = function(args) {
|
var handleOpenURL = function(args) {
|
||||||
|
|
@ -61,10 +61,10 @@ angular.module('copayApp.services').factory('openURLService', function($rootScop
|
||||||
handleOpenURL({
|
handleOpenURL({
|
||||||
url: pathData.substring(pathData.indexOf('bitcoin:'))
|
url: pathData.substring(pathData.indexOf('bitcoin:'))
|
||||||
});
|
});
|
||||||
} else if (pathData.indexOf('copay:') != -1) {
|
} else if (pathData.indexOf(appConfigService.name + '://') != -1) {
|
||||||
$log.debug('Copay URL found');
|
$log.debug(appConfigService.name + ' URL found');
|
||||||
handleOpenURL({
|
handleOpenURL({
|
||||||
url: pathData.substring(pathData.indexOf('copay:'))
|
url: pathData.substring(pathData.indexOf(appConfigService.name + '://'))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -425,9 +425,9 @@ angular.module('copayApp.services')
|
||||||
// }
|
// }
|
||||||
root.removeBitpayDebitCard = function(network, cardEid, cb) {
|
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, {
|
account.cards = lodash.reject(account.cards, {
|
||||||
'eid': cardEid
|
'eid': cardEid
|
||||||
});
|
});
|
||||||
|
|
@ -458,10 +458,16 @@ angular.module('copayApp.services')
|
||||||
storage.get('bitpayAccounts-v2-' + network, function(err, allAccountsStr) {
|
storage.get('bitpayAccounts-v2-' + network, function(err, allAccountsStr) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
||||||
|
if (!allAccountsStr)
|
||||||
|
return cb(null, {});
|
||||||
|
|
||||||
var allAccounts = {};
|
var allAccounts = {};
|
||||||
try {
|
try {
|
||||||
allAccounts = JSON.parse(allAccountsStr);
|
allAccounts = JSON.parse(allAccountsStr);
|
||||||
} catch (e) {};
|
} catch (e) {
|
||||||
|
$log.error('Bad storage value for bitpayAccount-v2' + allAccountsStr)
|
||||||
|
return cb(null, {});
|
||||||
|
};
|
||||||
|
|
||||||
var anyMigration;
|
var anyMigration;
|
||||||
|
|
||||||
|
|
@ -485,10 +491,10 @@ angular.module('copayApp.services')
|
||||||
});
|
});
|
||||||
|
|
||||||
if (anyMigration) {
|
if (anyMigration) {
|
||||||
storage.set('bitpayAccounts-v2-' + network, allAccounts, function(){
|
storage.set('bitpayAccounts-v2-' + network, allAccounts, function() {
|
||||||
return cb(err, allAccounts);
|
return cb(err, allAccounts);
|
||||||
});
|
});
|
||||||
} else
|
} else
|
||||||
return cb(err, allAccounts);
|
return cb(err, allAccounts);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue