Merge pull request #5581 from matiu/ver/v1.3.6

Ver/v1.3.6
This commit is contained in:
Matias Alejo Garcia 2017-02-07 16:22:13 -05:00 committed by GitHub
commit c3dd222c68
2 changed files with 13 additions and 7 deletions

View file

@ -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,

View file

@ -414,9 +414,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
}); });
@ -447,10 +447,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;
@ -474,10 +480,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);
}); });