From 7584d2b145de22e2522923498f71b1e73de5707e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 30 Aug 2016 11:33:32 -0300 Subject: [PATCH 1/6] onboarding restore feature --- public/views/onboarding/welcome.html | 4 ++-- public/views/tab-import-file.html | 4 ++-- public/views/tab-import-hardware.html | 4 ++-- public/views/tab-import-phrase.html | 4 ++-- src/js/controllers/backController.js | 10 ++++++++++ src/js/controllers/import.js | 4 ---- src/js/controllers/onboarding/welcomeController.js | 11 +++++++++++ src/js/routes.js | 2 +- 8 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 src/js/controllers/backController.js create mode 100644 src/js/controllers/onboarding/welcomeController.js diff --git a/public/views/onboarding/welcome.html b/public/views/onboarding/welcome.html index dbcde98e3..861e6ba87 100644 --- a/public/views/onboarding/welcome.html +++ b/public/views/onboarding/welcome.html @@ -1,5 +1,5 @@ - +

bitpay

@@ -7,7 +7,7 @@ Take control of your money - get started with bitcoin - +
diff --git a/public/views/tab-import-file.html b/public/views/tab-import-file.html index 437251135..e0069afa8 100644 --- a/public/views/tab-import-file.html +++ b/public/views/tab-import-file.html @@ -1,6 +1,6 @@ - + - diff --git a/public/views/tab-import-hardware.html b/public/views/tab-import-hardware.html index 9a85f29f7..041f3d499 100644 --- a/public/views/tab-import-hardware.html +++ b/public/views/tab-import-hardware.html @@ -1,6 +1,6 @@ - + - diff --git a/public/views/tab-import-phrase.html b/public/views/tab-import-phrase.html index c0255a2c7..42d4525fd 100644 --- a/public/views/tab-import-phrase.html +++ b/public/views/tab-import-phrase.html @@ -1,6 +1,6 @@ - + - diff --git a/src/js/controllers/backController.js b/src/js/controllers/backController.js new file mode 100644 index 000000000..c54ba0599 --- /dev/null +++ b/src/js/controllers/backController.js @@ -0,0 +1,10 @@ +'use strict'; + +angular.module('copayApp.controllers').controller('backController', function($scope, $state, $stateParams) { + + $scope.importGoBack = function() { + if ($stateParams.fromOnboarding) $state.go('onboarding.welcome'); + else $state.go('add.main'); + }; + +}); diff --git a/src/js/controllers/import.js b/src/js/controllers/import.js index 6e4b4deab..a70e5eab4 100644 --- a/src/js/controllers/import.js +++ b/src/js/controllers/import.js @@ -15,10 +15,6 @@ angular.module('copayApp.controllers').controller('importController', $scope.account = 1; $scope.importErr = false; - $scope.goBack = function() { - $ionicHistory.goBack(); - }; - var updateSeedSourceSelect = function() { $scope.seedOptions = []; diff --git a/src/js/controllers/onboarding/welcomeController.js b/src/js/controllers/onboarding/welcomeController.js new file mode 100644 index 000000000..cda0a930c --- /dev/null +++ b/src/js/controllers/onboarding/welcomeController.js @@ -0,0 +1,11 @@ +'use strict'; + +angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $ionicPopup, profileService) { + + $scope.goImport = function() { + $state.go('add.import.phrase', { + fromOnboarding: true + }); + } + +}); diff --git a/src/js/routes.js b/src/js/routes.js index 36d1f9edc..98b24680e 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -412,7 +412,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('add.import', { - url: '/import', + url: '/import/:fromOnboarding', abstract: true, views: { 'add': { From 74e6897d6632dd0a6398c4e3e299656ae5ade8bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 30 Aug 2016 15:38:48 -0300 Subject: [PATCH 2/6] create profile separately from default wallet --- public/views/onboarding/collectEmail.html | 8 +-- public/views/onboarding/tour.html | 4 +- public/views/onboarding/welcome.html | 5 +- src/js/controllers/backController.js | 11 +++- .../controllers/onboarding/backupWarning.js | 6 +-- src/js/controllers/onboarding/collectEmail.js | 5 -- src/js/controllers/onboarding/tour.js | 23 +++------ .../onboarding/welcomeController.js | 11 +++- src/js/routes.js | 2 +- src/js/services/profileService.js | 50 +++++++------------ 10 files changed, 57 insertions(+), 68 deletions(-) diff --git a/public/views/onboarding/collectEmail.html b/public/views/onboarding/collectEmail.html index a539eaaa0..bceda1776 100644 --- a/public/views/onboarding/collectEmail.html +++ b/public/views/onboarding/collectEmail.html @@ -1,12 +1,12 @@ - - + + - - + Wallet Created Where would you like to receive email notifications about payments
diff --git a/public/views/onboarding/tour.html b/public/views/onboarding/tour.html index be57326b9..34e3c122c 100644 --- a/public/views/onboarding/tour.html +++ b/public/views/onboarding/tour.html @@ -7,7 +7,7 @@ - @@ -55,7 +55,7 @@

Not even BitPay can access it

- diff --git a/public/views/onboarding/welcome.html b/public/views/onboarding/welcome.html index 861e6ba87..21d9018cf 100644 --- a/public/views/onboarding/welcome.html +++ b/public/views/onboarding/welcome.html @@ -1,8 +1,7 @@ - +
-

bitpay

- +

bitpay

Take control of your money - get started with bitcoin diff --git a/src/js/controllers/backController.js b/src/js/controllers/backController.js index c54ba0599..285f8f630 100644 --- a/src/js/controllers/backController.js +++ b/src/js/controllers/backController.js @@ -1,10 +1,19 @@ 'use strict'; -angular.module('copayApp.controllers').controller('backController', function($scope, $state, $stateParams) { +angular.module('copayApp.controllers').controller('backController', function($scope, $state, $stateParams, platformInfo) { + + var isCordova = platformInfo.isCordova; + var isWP = platformInfo.isWP; + var usePushNotifications = isCordova && !isWP; $scope.importGoBack = function() { if ($stateParams.fromOnboarding) $state.go('onboarding.welcome'); else $state.go('add.main'); }; + $scope.onboardingMailSkip = function() { + if (!usePushNotifications) $state.go('onboarding.backupRequest'); + else $state.go('onboarding.notifications'); + } + }); diff --git a/src/js/controllers/onboarding/backupWarning.js b/src/js/controllers/onboarding/backupWarning.js index f0b7c4978..9067b1bf6 100644 --- a/src/js/controllers/onboarding/backupWarning.js +++ b/src/js/controllers/onboarding/backupWarning.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $ionicPopup, profileService) { +angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $ionicPopup, $stateParams, profileService) { $scope.openPopup = function() { var backupWarningPopup = $ionicPopup.show({ @@ -10,12 +10,10 @@ angular.module('copayApp.controllers').controller('backupWarningController', fun $scope.close = function() { backupWarningPopup.close(); - var wallet = profileService.getWallets()[0]; $state.go('wallet.backup', { - walletId: wallet.credentials.walletId, + walletId: $stateParams.walletId, fromOnboarding: true }) }; } - }); diff --git a/src/js/controllers/onboarding/collectEmail.js b/src/js/controllers/onboarding/collectEmail.js index 8fda2d4df..220c349e5 100644 --- a/src/js/controllers/onboarding/collectEmail.js +++ b/src/js/controllers/onboarding/collectEmail.js @@ -6,11 +6,6 @@ angular.module('copayApp.controllers').controller('collectEmailController', func var isWP = platformInfo.isWP; var usePushNotifications = isCordova && !isWP; - $scope.skip = function() { - if (!usePushNotifications) $state.go('onboarding.backupRequest'); - else $state.go('onboarding.notifications'); - } - $scope.save = function(form) { var wallet = profileService.getWallet($stateParams.walletId); var email = $scope.email || ''; diff --git a/src/js/controllers/onboarding/tour.js b/src/js/controllers/onboarding/tour.js index 662b0431d..c5b69bde3 100644 --- a/src/js/controllers/onboarding/tour.js +++ b/src/js/controllers/onboarding/tour.js @@ -2,8 +2,9 @@ angular.module('copayApp.controllers').controller('tourController', function($scope, $state, $log, $timeout, ongoingProcess, profileService) { - $scope.init = function() { + var tries = 0; + $scope.init = function() { $scope.data = { index: 0 }; @@ -16,33 +17,25 @@ angular.module('copayApp.controllers').controller('tourController', } }; - $scope.createProfile = function(opts) { - var tries = 0; - opts = opts || {}; - $log.debug('Creating profile'); + $scope.createDefaultWallet = function() { ongoingProcess.set('creatingWallet', true); - profileService.create(opts, function(err) { + profileService.createDefaultWallet(function(err, walletClient) { if (err) { $log.warn(err); - $scope.error = err; - $scope.$apply(); return $timeout(function() { - $log.warn('Retrying to create profile......'); + $log.warn('Retrying to create default wallet......'); if (tries == 3) { tries == 0; - return $scope.createProfile({ - noWallet: true - }); + return $scope.createDefaultWallet(); } else { tries += 1; - return $scope.createProfile(); + return $scope.createDefaultWallet(); } }, 3000); }; - $scope.error = ""; ongoingProcess.set('creatingWallet', false); - var wallet = profileService.getWallets()[0]; + var wallet = walletClient; $state.go('onboarding.collectEmail', { walletId: wallet.credentials.walletId }); diff --git a/src/js/controllers/onboarding/welcomeController.js b/src/js/controllers/onboarding/welcomeController.js index cda0a930c..b6e529a11 100644 --- a/src/js/controllers/onboarding/welcomeController.js +++ b/src/js/controllers/onboarding/welcomeController.js @@ -1,11 +1,18 @@ 'use strict'; -angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $ionicPopup, profileService) { +angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $log, $ionicPopup, profileService) { $scope.goImport = function() { $state.go('add.import.phrase', { fromOnboarding: true }); - } + }; + + $scope.createProfile = function() { + $log.debug('Creating profile'); + profileService.createProfile(function(err) { + if (err) $log.warn(err); + }); + }; }); diff --git a/src/js/routes.js b/src/js/routes.js index 98b24680e..c12c61be6 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -554,7 +554,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr */ .state('onboarding', { - url: '/onboarding', + url: '/onboarding/:walletId', abstract: true, template: '' }) diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 44c38b697..37161dd00 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -367,26 +367,6 @@ angular.module('copayApp.services') }, 50); }; - // Creates the default Copay profile and its wallet - root.createDefaultProfile = function(opts, cb) { - var p = Profile.create(); - - if (opts.noWallet) { - return cb(null, p); - } - - opts.m = 1; - opts.n = 1; - opts.network = 'livenet'; - - doCreateWallet(opts, function(err, walletClient) { - if (err) return cb(err); - - p.addWallet(JSON.parse(walletClient.export())); - return cb(null, p); - }); - }; - // create and store a wallet root.createWallet = function(opts, cb) { doCreateWallet(opts, function(err, walletClient, secret) { @@ -482,6 +462,7 @@ angular.module('copayApp.services') if (!client || !client.credentials) return cb(gettext('Could not access wallet')); + if (root.profile) root.profile = Profile.create(); var walletId = client.credentials.walletId if (!root.profile.addWallet(JSON.parse(client.export()))) @@ -633,26 +614,33 @@ angular.module('copayApp.services') }); }; - root.create = function(opts, cb) { - $log.info('Creating profile', opts); + root.createProfile = function(cb) { + $log.info('Creating profile'); var defaults = configService.getDefaults(); configService.get(function(err) { - root.createDefaultProfile(opts, function(err, p) { - if (err) return cb(err); + if (err) $log.debug(err); - storageService.storeNewProfile(p, function(err) { - if (err) return cb(err); - root.bindProfile(p, function(err) { - // ignore NONAGREEDDISCLAIMER - if (err && err.toString().match('NONAGREEDDISCLAIMER')) return cb(); - return cb(err); - }); + var p = Profile.create(); + storageService.storeNewProfile(p, function(err) { + if (err) return cb(err); + root.bindProfile(p, function(err) { + // ignore NONAGREEDDISCLAIMER + if (err && err.toString().match('NONAGREEDDISCLAIMER')) return cb(); + return cb(err); }); }); }); }; + root.createDefaultWallet = function(cb) { + var opts = {}; + opts.m = 1; + opts.n = 1; + opts.network = 'livenet'; + root.createWallet(opts, cb); + }; + root.setDisclaimerAccepted = function(cb) { root.profile.disclaimerAccepted = true; storageService.storeProfile(root.profile, function(err) { From 8391aeeb5553f48a62eb4044eb662a005807b155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 30 Aug 2016 15:54:14 -0300 Subject: [PATCH 3/6] delete unused disclaimer.js --- src/js/controllers/disclaimer.js | 69 -------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 src/js/controllers/disclaimer.js diff --git a/src/js/controllers/disclaimer.js b/src/js/controllers/disclaimer.js deleted file mode 100644 index 9ce990011..000000000 --- a/src/js/controllers/disclaimer.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('disclaimerController', - function($scope, $rootScope, $timeout, $log, $ionicSideMenuDelegate, profileService, applicationService, gettextCatalog, uxLanguage, $state, storageService, gettext, platformInfo, ongoingProcess) { - var tries = 0; - var isCordova = platformInfo.isCordova; - - ongoingProcess.set('creatingWallet', true); - - var create = function(opts) { - opts = opts || {}; - $log.debug('Creating profile'); - - profileService.create(opts, function(err) { - if (err) { - $log.warn(err); - $scope.error = err; - $scope.$apply(); - - return $timeout(function() { - $log.warn('Retrying to create profile......'); - if (tries == 3) { - tries == 0; - return create({ - noWallet: true - }); - } else { - tries += 1; - return create(); - } - }, 3000); - }; - $scope.error = ""; - ongoingProcess.set('creatingWallet', false); - }); - }; - - $scope.init = function(opts) { - $ionicSideMenuDelegate.canDragContent(false); - $scope.lang = uxLanguage.currentLanguage; - - storageService.getProfile(function(err, profile) { - if (!profile) { - create(opts); - } else { - $log.info('There is already a profile'); - ongoingProcess.set('creatingWallet', false); - profileService.bindProfile(profile, function(err) { - if (!err || !err.message || !err.message.match('NONAGREEDDISCLAIMER')) { - $log.debug('Disclaimer already accepted at #disclaimer. Redirect to Wallet Home.'); - $ionicSideMenuDelegate.canDragContent(true); - $state.go('tabs.home'); - } - }); - } - }); - }; - - $scope.accept = function() { - profileService.setDisclaimerAccepted(function(err) { - if (err) $log.error(err); - else { - $ionicSideMenuDelegate.canDragContent(true); - $rootScope.$emit('disclaimerAccepted'); - $state.go('tabs.home'); - } - }); - }; - }); From b804a6d8672f09d7b6207568e2ff005ed4154688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 30 Aug 2016 16:09:39 -0300 Subject: [PATCH 4/6] adding translation tags --- public/views/includes/backupLaterPopup.html | 4 ++-- public/views/includes/backupWarningPopup.html | 2 +- public/views/onboarding/backupWarning.html | 2 +- public/views/onboarding/collectEmail.html | 6 +++--- public/views/onboarding/terms.html | 4 ++-- public/views/onboarding/tour.html | 12 ++++++------ 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/public/views/includes/backupLaterPopup.html b/public/views/includes/backupLaterPopup.html index 91d28fd13..5e6304755 100644 --- a/public/views/includes/backupLaterPopup.html +++ b/public/views/includes/backupLaterPopup.html @@ -1,10 +1,10 @@

Without a backup, you could lose money

If something happens to this device, this app is deleted, or your password forgotten, neither you nor Bitpay can revoer your funds. - -
diff --git a/public/views/includes/backupWarningPopup.html b/public/views/includes/backupWarningPopup.html index a8e3cd9c1..fbe1b79fd 100644 --- a/public/views/includes/backupWarningPopup.html +++ b/public/views/includes/backupWarningPopup.html @@ -1,7 +1,7 @@

Screenshots are not secure

if you take a screenshot, your backup may be viewed by others apps. You can make a safe backup with paper and a pen. -
diff --git a/public/views/onboarding/backupWarning.html b/public/views/onboarding/backupWarning.html index aeef8f7d0..0a5a4086d 100644 --- a/public/views/onboarding/backupWarning.html +++ b/public/views/onboarding/backupWarning.html @@ -2,7 +2,7 @@ diff --git a/public/views/onboarding/collectEmail.html b/public/views/onboarding/collectEmail.html index bceda1776..eb5bda54b 100644 --- a/public/views/onboarding/collectEmail.html +++ b/public/views/onboarding/collectEmail.html @@ -2,13 +2,13 @@ - Wallet Created - Where would you like to receive email notifications about payments + Wallet Created + Where would you like to receive email notifications about payments diff --git a/public/views/onboarding/terms.html b/public/views/onboarding/terms.html index a69ffa564..49861a15e 100644 --- a/public/views/onboarding/terms.html +++ b/public/views/onboarding/terms.html @@ -1,9 +1,9 @@ - Terms of Use + {{'Terms of Use' | translate}} diff --git a/public/views/onboarding/tour.html b/public/views/onboarding/tour.html index 34e3c122c..0261a14c1 100644 --- a/public/views/onboarding/tour.html +++ b/public/views/onboarding/tour.html @@ -1,14 +1,14 @@ - Get Started + {{'Get Started' | translate}} @@ -23,7 +23,7 @@

Just scan the code to pay

-
@@ -39,7 +39,7 @@

The exchange rate changes with the market

- @@ -55,7 +55,7 @@

Not even BitPay can access it

- From 6eb87704bacb74174df965d57bd6f92af10fdcb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 30 Aug 2016 16:37:05 -0300 Subject: [PATCH 5/6] adding backup flag on localstorage --- src/js/controllers/backup.js | 9 ++++++--- src/js/controllers/create.js | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/js/controllers/backup.js b/src/js/controllers/backup.js index 83178813c..27ad27aba 100644 --- a/src/js/controllers/backup.js +++ b/src/js/controllers/backup.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('backupController', - function($rootScope, $scope, $timeout, $log, $state, $stateParams, $ionicPopup, $ionicNavBarDelegate, uxLanguage, lodash, fingerprintService, platformInfo, configService, profileService, bwcService, walletService, ongoingProcess) { + function($rootScope, $scope, $timeout, $log, $state, $stateParams, $ionicPopup, $ionicNavBarDelegate, uxLanguage, lodash, fingerprintService, platformInfo, configService, profileService, bwcService, walletService, ongoingProcess, storageService) { var wallet = profileService.getWallet($stateParams.walletId); $ionicNavBarDelegate.title(wallet.credentials.walletName); $scope.n = wallet.n; @@ -136,8 +136,11 @@ angular.module('copayApp.controllers').controller('backupController', } } - $rootScope.$emit('Local/BackupDone'); - return cb(); + $log.debug('Backup done'); + storageService.setBackupFlag(wallet.credentials.walletId, function(err) { + $log.debug('Backup stored'); + return cb(); + }); }, 1); }; diff --git a/src/js/controllers/create.js b/src/js/controllers/create.js index edf5085b8..1a1ec2dd2 100644 --- a/src/js/controllers/create.js +++ b/src/js/controllers/create.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('createController', - function($scope, $rootScope, $timeout, $log, lodash, $state, profileService, configService, gettext, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService) { + function($scope, $rootScope, $timeout, $log, lodash, $state, profileService, configService, gettext, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, storageService) { var isChromeApp = platformInfo.isChromeApp; var isCordova = platformInfo.isCordova; @@ -184,7 +184,10 @@ angular.module('copayApp.controllers').controller('createController', if (self.seedSourceId == 'set') { $timeout(function() { - $rootScope.$emit('Local/BackupDone'); + $log.debug('Backup done'); + storageService.setBackupFlag(wallet.credentials.walletId, function(err) { + $log.debug('Backup stored'); + }); }, 1); } $state.go('tabs.home') From a595c60892528304b94bee223ba1ae96884a5fb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 30 Aug 2016 17:31:29 -0300 Subject: [PATCH 6/6] set disclaimer flag when import wallet --- src/js/controllers/import.js | 31 +++++++++++++++++++++++++++++++ src/js/services/profileService.js | 1 - 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/import.js b/src/js/controllers/import.js index a70e5eab4..cb24f92cc 100644 --- a/src/js/controllers/import.js +++ b/src/js/controllers/import.js @@ -110,6 +110,11 @@ angular.module('copayApp.controllers').controller('importController', }); $rootScope.$emit('Local/WalletImported', client.credentials.walletId); + if ($stateParams.fromOnboarding) + profileService.setDisclaimerAccepted(function(err) { + if (err) $log.error(err); + }); + $state.go('tabs.home'); }); }, 100); @@ -137,6 +142,11 @@ angular.module('copayApp.controllers').controller('importController', }); $rootScope.$emit('Local/WalletImported', client.credentials.walletId); + if ($stateParams.fromOnboarding) + profileService.setDisclaimerAccepted(function(err) { + if (err) $log.error(err); + }); + $state.go('tabs.home'); }); }, 100); @@ -157,6 +167,11 @@ angular.module('copayApp.controllers').controller('importController', }); } $rootScope.$emit('Local/WalletImported', walletId); + if ($stateParams.fromOnboarding) + profileService.setDisclaimerAccepted(function(err) { + if (err) $log.error(err); + }); + $state.go('tabs.home'); }); }, 100); @@ -186,6 +201,11 @@ angular.module('copayApp.controllers').controller('importController', }); $rootScope.$emit('Local/WalletImported', client.credentials.walletId); + if ($stateParams.fromOnboarding) + profileService.setDisclaimerAccepted(function(err) { + if (err) $log.error(err); + }); + $state.go('tabs.home'); }); }, 100); @@ -320,6 +340,11 @@ angular.module('copayApp.controllers').controller('importController', $log.debug('Remote preferences saved for:' + wallet.walletId) }); $rootScope.$emit('Local/WalletImported', wallet.walletId); + if ($stateParams.fromOnboarding) + profileService.setDisclaimerAccepted(function(err) { + if (err) $log.error(err); + }); + $state.go('tabs.home'); }); }, 100); @@ -397,6 +422,12 @@ angular.module('copayApp.controllers').controller('importController', $log.debug('Remote preferences saved for:' + wallet.walletId) }); $rootScope.$emit('Local/WalletImported', wallet.walletId); + + if ($stateParams.fromOnboarding) + profileService.setDisclaimerAccepted(function(err) { + if (err) $log.error(err); + }); + $state.go('tabs.home'); }); }, 100); diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 37161dd00..3026753f9 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -462,7 +462,6 @@ angular.module('copayApp.services') if (!client || !client.credentials) return cb(gettext('Could not access wallet')); - if (root.profile) root.profile = Profile.create(); var walletId = client.credentials.walletId if (!root.profile.addWallet(JSON.parse(client.export())))