mirror of https://github.com/BTCPrivate/copay.git
add delete history button in advanced->wallet info
This commit is contained in:
parent
fef5e23619
commit
402a406827
|
@ -96,7 +96,6 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="no-bullet m0 size-14" ng-show="index.balanceByAddress">
|
||||
<div ng-if="index.balanceByAddress[0]">
|
||||
<h4 class="title m0" translate>Balance By Address</h4>
|
||||
|
@ -111,6 +110,15 @@
|
|||
</div>
|
||||
</ul>
|
||||
|
||||
<ul class="no-bullet m0 size-14">
|
||||
<h4 class="title m0" translate>Transaction history</h4>
|
||||
<li class="line-b p20 oh">
|
||||
<button class="black round small expand" ng-style="{'background-color':index.backgroundColor}" ng-click="info.clearTransactionHistory();">
|
||||
<span translate>Clear history</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4></h4>
|
||||
|
||||
<div class="extra-margin-bottom"></div>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||
function($scope, $log, $timeout, isMobile, gettextCatalog, lodash, profileService) {
|
||||
function($scope, $log, $timeout, isMobile, gettextCatalog, lodash, profileService, storageService) {
|
||||
var base = 'xpub';
|
||||
|
||||
this.init = function() {
|
||||
var fc = profileService.focusedClient;
|
||||
var c = fc.credentials;
|
||||
|
||||
this.init = function() {
|
||||
var basePath = profileService.getUtils().getBaseAddressDerivationPath(c.derivationStrategy, c.network, 0);
|
||||
|
||||
$scope.walletName = c.walletName;
|
||||
|
@ -45,7 +45,6 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
|||
|
||||
this.sendAddrs = function() {
|
||||
var self = this;
|
||||
var fc = profileService.focusedClient;
|
||||
|
||||
if (isMobile.Android() || isMobile.Windows()) {
|
||||
window.ignoreMobilePause = true;
|
||||
|
@ -94,4 +93,10 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
|||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
this.clearTransactionHistory = function() {
|
||||
storageService.removeTxHistory(c.walletId, function() {
|
||||
$log.info('The wallet transaction history has been deleted');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue