mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #52 from gabrielbazan7/fix/clearHistory
clear history on settings
This commit is contained in:
commit
0478fbf276
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('exportController',
|
||||
function($rootScope, $scope, $timeout, $log, lodash, backupService, walletService, storageService, profileService, platformInfo, gettext, gettextCatalog, $state, $stateParams, popupService) {
|
||||
function($rootScope, $scope, $timeout, $log, $ionicHistory, lodash, backupService, walletService, storageService, profileService, platformInfo, gettext, gettextCatalog, $state, $stateParams, popupService) {
|
||||
var prevState;
|
||||
var isWP = platformInfo.isWP;
|
||||
var isAndroid = platformInfo.isAndroid;
|
||||
|
@ -63,6 +63,7 @@ angular.module('copayApp.controllers').controller('exportController',
|
|||
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Failed to export'));
|
||||
return;
|
||||
}
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('copayApp.controllers').controller('paperWalletController',
|
||||
function($scope, $timeout, $log, $ionicModal, configService, profileService, $state, addressService, bitcore, ongoingProcess, txFormatService, $stateParams, walletService) {
|
||||
function($scope, $timeout, $log, $ionicModal, $ionicHistory, configService, profileService, $state, addressService, bitcore, ongoingProcess, txFormatService, $stateParams, walletService) {
|
||||
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
var rawTx;
|
||||
|
@ -102,6 +102,7 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
|||
} else {
|
||||
var type = walletService.getViewStatus(wallet, txp);
|
||||
$scope.openStatusModal(type, txp, function() {
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.controllers').controller('paymentUriController',
|
||||
function($rootScope, $scope, $stateParams, $location, $timeout, profileService, configService, lodash, bitcore, $state) {
|
||||
function($rootScope, $scope, $stateParams, $location, $timeout, $ionicHistory, profileService, configService, lodash, bitcore, $state) {
|
||||
function strip(number) {
|
||||
return (parseFloat(number.toPrecision(12)));
|
||||
};
|
||||
|
@ -47,6 +47,7 @@ angular.module('copayApp.controllers').controller('paymentUriController',
|
|||
this.selectWallet = function(wid) {
|
||||
var self = this;
|
||||
profileService.setAndStoreFocus(wid, function() {});
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
$timeout(function() {
|
||||
$rootScope.$emit('paymentUri', self.bitcoinURI);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
|
||||
function($scope, $ionicPopup, $stateParams, $ionicNavBarDelegate, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService) {
|
||||
function($scope, $ionicPopup, $stateParams, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService) {
|
||||
$ionicNavBarDelegate.title(gettextCatalog.getString('Delete Wallet'));
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.alias = lodash.isEqual(wallet.name, wallet.credentials.walletName) ? null : wallet.name + ' ';
|
||||
|
@ -37,6 +37,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
if (err) {
|
||||
popupService.showAlert(gettextCatalog.getString('Error'), err.message || err);
|
||||
} else {
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||
function($scope, $log, $stateParams, $timeout, $ionicNavBarDelegate, gettextCatalog, storageService, $state, profileService, lodash) {
|
||||
function($scope, $log, $stateParams, $timeout, $ionicNavBarDelegate, gettextCatalog, storageService, $state, $ionicHistory, profileService, lodash) {
|
||||
$ionicNavBarDelegate.title(gettextCatalog.getString('Transaction History'));
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
var c = wallet.credentials;
|
||||
|
@ -126,6 +126,7 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
|||
$scope.$emit('Local/ClearHistory');
|
||||
|
||||
$timeout(function() {
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
}, 100);
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||
function($scope, $log, $timeout, $ionicNavBarDelegate, platformInfo, gettextCatalog, lodash, profileService, configService, $stateParams, walletService, $state) {
|
||||
function($scope, $log, $timeout, $ionicNavBarDelegate, $ionicHistory, platformInfo, gettextCatalog, lodash, profileService, configService, $stateParams, walletService, $state) {
|
||||
$ionicNavBarDelegate.title(gettextCatalog.getString('Wallet Information'));
|
||||
var base = 'xpub';
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
|
@ -105,6 +105,7 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
|||
opts.colorFor[walletId] = color;
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
if (err) $log.warn(err);
|
||||
});
|
||||
|
@ -116,6 +117,7 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
|||
|
||||
$scope.scan = function() {
|
||||
walletService.startScan(wallet);
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.services')
|
||||
.factory('applicationService', function($rootScope, $timeout, platformInfo, $state) {
|
||||
.factory('applicationService', function($rootScope, $timeout, $ionicHistory, platformInfo, $state) {
|
||||
var root = {};
|
||||
|
||||
var isChromeApp = platformInfo.isChromeApp;
|
||||
|
@ -19,6 +19,7 @@ angular.module('copayApp.services')
|
|||
if (isChromeApp) {
|
||||
chrome.runtime.reload();
|
||||
} else if (isNW) {
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
$timeout(function() {
|
||||
var win = require('nw.gui').Window.get();
|
||||
|
|
Loading…
Reference in New Issue