mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #307 from JDonadio/fix/warning-backup-transition
Fix time to close modal - backup warning
This commit is contained in:
commit
88ca113a0c
|
@ -198,7 +198,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
|||
walletService.getKeys(wallet, function(err, k) {
|
||||
if (err || !k) {
|
||||
$log.error('Could not get keys: ', err);
|
||||
$state.go('wallet.preferences');
|
||||
$ionicHistory.goBack();
|
||||
return;
|
||||
}
|
||||
$scope.credentialsEncrypted = false;
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $timeout, $stateParams, profileService, $ionicModal) {
|
||||
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $timeout, $stateParams, $ionicModal) {
|
||||
|
||||
$scope.walletId = $stateParams.walletId;
|
||||
$scope.openPopup = function() {
|
||||
$ionicModal.fromTemplateUrl('views/includes/screenshotWarningModal.html', {
|
||||
scope: $scope,
|
||||
|
@ -15,14 +14,19 @@ angular.module('copayApp.controllers').controller('backupWarningController', fun
|
|||
|
||||
$scope.close = function() {
|
||||
$scope.warningModal.hide();
|
||||
if ($stateParams.from == 'onboarding.backupRequest')
|
||||
$scope.warningModal.remove();
|
||||
|
||||
$timeout(function() {
|
||||
if ($stateParams.from == 'onboarding.backupRequest') {
|
||||
$state.go('onboarding.backup', {
|
||||
walletId: $stateParams.walletId
|
||||
});
|
||||
else
|
||||
} else {
|
||||
$state.go($stateParams.from + '.backup', {
|
||||
walletId: $stateParams.walletId
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue