This commit is contained in:
Matias Alejo Garcia 2016-08-19 13:07:18 -03:00
commit a8cf875def
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
22 changed files with 53 additions and 1392 deletions

View file

@ -4,27 +4,25 @@ angular.module('copayApp.controllers').controller('backupController',
function($rootScope, $scope, $timeout, $log, $state, lodash, fingerprintService, platformInfo, configService, profileService, gettext, bwcService, walletService, ongoingProcess) {
var fc = profileService.focusedClient;
var prevState;
$scope.customWords = [];
$scope.walletName = fc.credentials.walletName;
$scope.credentialsEncrypted = fc.isPrivKeyEncrypted;
$scope.init = function(state) {
prevState = state || 'walletHome';
$scope.init = function() {
$scope.step = 1;
$scope.deleted = isDeletedSeed();
if ($scope.deleted) return;
fingerprintService.check(fc, function(err) {
if (err) {
go.path(prevState);
$state.go('tabs.home')
return;
}
handleEncryptedWallet(fc, function(err) {
if (err) {
$log.warn('Error decrypting credentials:', $scope.error);
go.path(prevState);
$state.go('tabs.home')
return;
}
$scope.credentialsEncrypted = false;