advanced settings

This commit is contained in:
Gabriel Bazán 2016-09-27 15:57:39 -03:00
commit d75af58ddf
9 changed files with 239 additions and 86 deletions

View file

@ -39,10 +39,28 @@ angular.module('copayApp.services').factory('configService', function(storageSer
},
coinbase: {
enabled: true,
enabled: false, //disable coinbase for this release
testnet: false
},
bitpayCard: {
enabled: true
},
amazon: {
enabled: true
},
//Experimental Features
recentTransactions: {
enabled: true
},
frequentlyUsed: {
enabled: true
},
rates: {
url: 'https://insight.bitpay.com:443/api/rates',
},
@ -111,6 +129,18 @@ angular.module('copayApp.services').factory('configService', function(storageSer
if (!configCache.coinbase) {
configCache.coinbase = defaultConfig.coinbase;
}
if (!configCache.amazon) {
configCache.amazon = defaultConfig.amazon;
}
if (!configCache.bitpayCard) {
configCache.bitpayCard = defaultConfig.bitpayCard;
}
if (!configCache.recentTransactions) {
configCache.recentTransactions = defaultConfig.recentTransactions;
}
if (!configCache.frequentlyUsed) {
configCache.frequentlyUsed = defaultConfig.frequentlyUsed;
}
if (!configCache.pushNotifications) {
configCache.pushNotifications = defaultConfig.pushNotifications;
}

View file

@ -780,21 +780,11 @@ angular.module('copayApp.services')
var TIME_STAMP = 60 * 60 * 24 * 7;
var MAX = 100;
var typeFilter1 = {
'NewBlock': 1,
'BalanceUpdated': 1,
'NewOutgoingTxByThirdParty': 1,
'NewAddress': 1,
'TxProposalFinallyAccepted': 1,
'TxProposalFinallyRejected': 1,
var typeFilter = {
'NewOutgoingTx': 1,
'NewIncomingTx': 1
};
var typeFilter2 = {
'TxProposalAcceptedBy': 1,
'TxProposalRejectedBy': 1,
'NewTxProposal': 1,
}
var w = root.getWallets();
if (lodash.isEmpty(w)) return cb();
@ -895,15 +885,9 @@ angular.module('copayApp.services')
var n;
n = lodash.filter(wallet.cachedActivity.n, function(x) {
return !typeFilter1[x.type];
return typeFilter[x.type];
});
if (wallet.m == 1) {
n = lodash.filter(n, function(x) {
return !typeFilter2[x.type];
});
}
var idToName = {};
if (wallet.cachedStatus) {
lodash.each(wallet.cachedStatus.wallet.copayers, function(c) {