Merge pull request #1609 from cmgustavo/feature/import-from-localstorage

Import Old wallets from localStorage
This commit is contained in:
Matias Alejo Garcia 2014-10-30 16:54:53 -03:00
commit fcb2401fff
13 changed files with 67 additions and 81 deletions

View file

@ -1,5 +1,13 @@
'use strict';
angular.module('copayApp.services').factory('Compatibility', function() {
return require('copay').Compatibility;
angular.module('copayApp.services').factory('Compatibility', function($rootScope) {
var root = {};
root.check = function (scope) {
copay.Compatibility.listWalletsPre8(function(wallets) {
scope.anyWallet = wallets.length > 0 ? true : false;
scope.oldWallets = wallets;
});
};
return root;
});

View file

@ -4,24 +4,6 @@ angular.module('copayApp.services')
.factory('identityService', function($rootScope, $location, pluginManager, controllerUtils) {
var root = {};
root.check = function (scope) {
copay.Identity.checkIfExistsAny({
pluginManager: pluginManager,
}, function(anyProfile) {
copay.Wallet.checkIfExistsAny({
pluginManager: pluginManager,
}, function(anyWallet) {
scope.retreiving = false;
scope.anyProfile = anyProfile ? true : false;
scope.anyWallet = anyWallet ? true : false;
if (!scope.anyProfile) {
$location.path('/createProfile');
}
});
});
};
root.create = function(scope, form) {
var iden = copay.Identity.create({
email: form.email.$modelValue,