Wallet/src/js/controllers/preferencesHistory.js
2015-12-02 16:11:55 -03:00

21 lines
560 B
JavaScript

'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);
});
}
});