import refactor
This commit is contained in:
parent
657c2b830c
commit
d5ef1e071d
1 changed files with 18 additions and 68 deletions
|
|
@ -101,18 +101,7 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
finish(client);
|
||||||
walletService.updateRemotePreferences(client, {}, function() {
|
|
||||||
$log.debug('Remote preferences saved for:' + client.credentials.walletId)
|
|
||||||
});
|
|
||||||
|
|
||||||
profileService.setBackupFlag(client.credentials.walletId);
|
|
||||||
if ($stateParams.fromOnboarding) {
|
|
||||||
profileService.setDisclaimerAccepted(function(err) {
|
|
||||||
if (err) $log.error(err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$state.go('tabs.home');
|
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
@ -132,19 +121,7 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
finish(client);
|
||||||
|
|
||||||
walletService.updateRemotePreferences(client, {}, function() {
|
|
||||||
$log.debug('Remote preferences saved for:' + client.credentials.walletId)
|
|
||||||
});
|
|
||||||
|
|
||||||
profileService.setBackupFlag(client.credentials.walletId);
|
|
||||||
if ($stateParams.fromOnboarding) {
|
|
||||||
profileService.setDisclaimerAccepted(function(err) {
|
|
||||||
if (err) $log.error(err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$state.go('tabs.home');
|
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
@ -163,13 +140,6 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
profileService.setBackupFlag(walletId);
|
|
||||||
if ($stateParams.fromOnboarding) {
|
|
||||||
profileService.setDisclaimerAccepted(function(err) {
|
|
||||||
if (err) $log.error(err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$state.go('tabs.home');
|
$state.go('tabs.home');
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
@ -193,18 +163,7 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
finish(client);
|
||||||
walletService.updateRemotePreferences(client, {}, function() {
|
|
||||||
$log.debug('Remote preferences saved for:' + client.credentials.walletId)
|
|
||||||
});
|
|
||||||
|
|
||||||
profileService.setBackupFlag(client.credentials.walletId);
|
|
||||||
if ($stateParams.fromOnboarding) {
|
|
||||||
profileService.setDisclaimerAccepted(function(err) {
|
|
||||||
if (err) $log.error(err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$state.go('tabs.home');
|
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
@ -312,19 +271,7 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
popupService.showAlert(gettextCatalog.getString('Error'), err);
|
popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
finish(wallet);
|
||||||
|
|
||||||
walletService.updateRemotePreferences(wallet, {}, function() {
|
|
||||||
$log.debug('Remote preferences saved for:' + wallet.walletId)
|
|
||||||
});
|
|
||||||
|
|
||||||
profileService.setBackupFlag(wallet.walletId);
|
|
||||||
if ($stateParams.fromOnboarding) {
|
|
||||||
profileService.setDisclaimerAccepted(function(err) {
|
|
||||||
if (err) $log.error(err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$state.go('tabs.home');
|
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
@ -388,23 +335,26 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
popupService.showAlert(gettextCatalog.getString('Error'), err);
|
popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
finish(wallet);
|
||||||
|
|
||||||
walletService.updateRemotePreferences(wallet, {}, function() {
|
|
||||||
$log.debug('Remote preferences saved for:' + wallet.walletId)
|
|
||||||
});
|
|
||||||
|
|
||||||
profileService.setBackupFlag(wallet.walletId);
|
|
||||||
if ($stateParams.fromOnboarding) {
|
|
||||||
profileService.setDisclaimerAccepted(function(err) {
|
|
||||||
if (err) $log.error(err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$state.go('tabs.home');
|
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var finish = function(wallet) {
|
||||||
|
|
||||||
|
walletService.updateRemotePreferences(wallet, {}, function() {
|
||||||
|
$log.debug('Remote preferences saved for:' + wallet.credentials.walletId)
|
||||||
|
});
|
||||||
|
|
||||||
|
profileService.setBackupFlag(wallet.credentials.walletId);
|
||||||
|
if ($stateParams.fromOnboarding) {
|
||||||
|
profileService.setDisclaimerAccepted(function(err) {
|
||||||
|
if (err) $log.error(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$state.go('tabs.home');
|
||||||
|
};
|
||||||
|
|
||||||
updateSeedSourceSelect();
|
updateSeedSourceSelect();
|
||||||
$scope.setSeedSource();
|
$scope.setSeedSource();
|
||||||
if ($stateParams.code) $scope.processWalletInfo($stateParams.code);
|
if ($stateParams.code) $scope.processWalletInfo($stateParams.code);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue