transaction history options in preferences advanced

This commit is contained in:
Gabriel Bazán 2015-12-02 15:34:34 -03:00
commit 00e0076a90
7 changed files with 62 additions and 32 deletions

View file

@ -0,0 +1,21 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesHistory',
function($scope, $log, $timeout, storageService, go, profileService) {
var fc = profileService.focusedClient;
var c = fc.credentials;
this.clearTransactionHistory = function() {
storageService.removeTxHistory(c.walletId, function(err) {
if (err) {
$log.error(err);
return;
}
$scope.$emit('Local/ClearHistory');
$timeout(function() {
go.walletHome();
}, 100);
});
}
});

View file

@ -7,7 +7,7 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
var c = fc.credentials;
this.init = function() {
var basePath = c.getBaseAddressDerivationPath();
var basePath = c.getBaseAddressDerivationPath();
$scope.walletName = c.walletName;
$scope.walletId = c.walletId;
@ -94,17 +94,4 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
}, 100);
};
this.clearTransactionHistory = function() {
storageService.removeTxHistory(c.walletId, function(err) {
if (err) {
$log.error(err);
return;
}
$scope.$emit('Local/ClearHistory');
$timeout(function() {
go.walletHome();
}, 100);
});
}
});