transaction history options in preferences advanced
This commit is contained in:
parent
ce71258934
commit
00e0076a90
7 changed files with 62 additions and 32 deletions
21
src/js/controllers/preferencesHistory.js
Normal file
21
src/js/controllers/preferencesHistory.js
Normal 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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue