Merge pull request #5479 from matiu/bug/delete-tx-history
fix delete tx history
This commit is contained in:
commit
5a945a8c8b
16 changed files with 101 additions and 7 deletions
|
|
@ -3,6 +3,7 @@
|
|||
angular.module('copayApp.controllers').controller('exportController',
|
||||
function($scope, $timeout, $log, $ionicHistory, $ionicScrollDelegate, backupService, walletService, storageService, profileService, platformInfo, gettextCatalog, $state, $stateParams, popupService, appConfigService) {
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.wallet = wallet;
|
||||
|
||||
$scope.showAdvChange = function() {
|
||||
$scope.showAdv = !$scope.showAdv;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
angular.module('copayApp.controllers').controller('preferencesAdvancedController', function($scope, $timeout, $stateParams, profileService) {
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.network = wallet.network;
|
||||
$scope.wallet = wallet;
|
||||
|
||||
|
||||
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
|
|||
$scope.success = null;
|
||||
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.wallet = wallet;
|
||||
|
||||
var walletId = wallet.credentials.walletId;
|
||||
var defaults = configService.getDefaults();
|
||||
var config = configService.getSync();
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
|
||||
function($scope, $stateParams, $ionicHistory, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService) {
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.wallet = wallet;
|
||||
|
||||
$scope.alias = lodash.isEqual(wallet.name, wallet.credentials.walletName) ? null : wallet.name + ' ';
|
||||
$scope.walletName = wallet.credentials.walletName;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||
function($scope, $log, $stateParams, $timeout, $state, $ionicHistory, storageService, platformInfo, profileService, lodash, appConfigService) {
|
||||
function($scope, $log, $stateParams, $timeout, $state, $ionicHistory, storageService, platformInfo, profileService, lodash, appConfigService, walletService) {
|
||||
$scope.wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.csvReady = false;
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
$scope.appName = appConfigService.nameCase;
|
||||
|
||||
|
||||
// TODO : move this to walletService.
|
||||
$scope.csvHistory = function(cb) {
|
||||
var allTxs = [];
|
||||
|
||||
|
|
@ -123,12 +125,17 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
|||
};
|
||||
|
||||
$scope.clearTransactionHistory = function() {
|
||||
storageService.removeTxHistory($scope.wallet.id, function(err) {
|
||||
$log.info('Removing Transaction history ' + $scope.wallet.id);
|
||||
|
||||
walletService.clearTxHistory($scope.wallet, function(err) {
|
||||
|
||||
if (err) {
|
||||
$log.error(err);
|
||||
return;
|
||||
}
|
||||
|
||||
$log.info('Transaction history cleared for :' + $scope.wallet.id);
|
||||
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
$timeout(function() {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||
function($scope, $log, $ionicHistory, platformInfo, lodash, profileService, configService, $stateParams, $state) {
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.wallet = wallet;
|
||||
|
||||
var walletId = wallet.id;
|
||||
var config = configService.getSync();
|
||||
var colorCounter = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue