Merge pull request #1609 from cmgustavo/feature/import-from-localstorage
Import Old wallets from localStorage
This commit is contained in:
commit
fcb2401fff
13 changed files with 67 additions and 81 deletions
|
|
@ -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;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue