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) {
|
walletService.getKeys(wallet, function(err, k) {
|
||||||
if (err || !k) {
|
if (err || !k) {
|
||||||
$log.error('Could not get keys: ', err);
|
$log.error('Could not get keys: ', err);
|
||||||
$state.go('wallet.preferences');
|
$ionicHistory.goBack();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$scope.credentialsEncrypted = false;
|
$scope.credentialsEncrypted = false;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
'use strict';
|
'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() {
|
$scope.openPopup = function() {
|
||||||
$ionicModal.fromTemplateUrl('views/includes/screenshotWarningModal.html', {
|
$ionicModal.fromTemplateUrl('views/includes/screenshotWarningModal.html', {
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
|
@ -15,14 +14,19 @@ angular.module('copayApp.controllers').controller('backupWarningController', fun
|
||||||
|
|
||||||
$scope.close = function() {
|
$scope.close = function() {
|
||||||
$scope.warningModal.hide();
|
$scope.warningModal.hide();
|
||||||
if ($stateParams.from == 'onboarding.backupRequest')
|
$scope.warningModal.remove();
|
||||||
$state.go('onboarding.backup', {
|
|
||||||
walletId: $stateParams.walletId
|
$timeout(function() {
|
||||||
});
|
if ($stateParams.from == 'onboarding.backupRequest') {
|
||||||
else
|
$state.go('onboarding.backup', {
|
||||||
$state.go($stateParams.from + '.backup', {
|
walletId: $stateParams.walletId
|
||||||
walletId: $stateParams.walletId
|
});
|
||||||
});
|
} else {
|
||||||
|
$state.go($stateParams.from + '.backup', {
|
||||||
|
walletId: $stateParams.walletId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue