- {{(error)|translate}}. Retrying...
-
+
I affirm that I have read, understood, and agree with these terms.
+
+
+ {{(error)|translate}}. Retrying...
+
+
-
diff --git a/src/css/main.css b/src/css/main.css
index bb4cf5588..16b0b35b1 100644
--- a/src/css/main.css
+++ b/src/css/main.css
@@ -1107,7 +1107,13 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
.scrollArea ul {
font-size: 0.8rem;
- text-align: left;
+ text-align: justify;
+ margin-left: 0;
+}
+
+.scrollArea li {
+ list-style-type:none;
+ display: inline;
}
.tabbable {
diff --git a/src/js/controllers/disclaimer.js b/src/js/controllers/disclaimer.js
index 8e038aee4..be720f3f9 100644
--- a/src/js/controllers/disclaimer.js
+++ b/src/js/controllers/disclaimer.js
@@ -1,38 +1,37 @@
'use strict';
angular.module('copayApp.controllers').controller('disclaimerController',
- function($scope, $timeout, $log, profileService, isCordova, storageService, gettextCatalog, applicationService, uxLanguage, go) {
+ function($scope, $timeout, $log, profileService, isCordova, storageService, gettextCatalog, uxLanguage, go) {
self = this;
- $scope.noProfile = true;
+ $scope.lang = uxLanguage.currentLanguage;
- $scope.create = function() {
- storageService.setCopayDisclaimerFlag(function(err) {
- applicationService.restart();
+ $scope.goHome = function() {
+ go.walletHome();
+ };
+
+ var create = function () {
+ $scope.creatingProfile = true;
+ profileService.create({}, function(err) {
+
+ if (err) {
+
+ if (err == 'EEXISTS')
+ return go.walletHome();
+
+ $log.warn(err);
+ $scope.error = err;
+ $scope.$apply();
+ $timeout(function() {
+ $log.warn('Retrying to create profile......');
+ create();
+ }, 3000);
+ } else {
+ $scope.error = "";
+ $scope.creatingProfile = false;
+ }
});
};
- $scope.init = function(noWallet) {
- storageService.getCopayDisclaimerFlag(function(err, val) {
- $scope.lang = uxLanguage.currentLanguage;
- $scope.agreed = val;
-
- profileService.create({
- noWallet: noWallet
- }, function(err) {
- if (err && !'EEXIST') {
- $log.warn(err);
- $scope.error = err;
- $scope.$apply();
- $scope.noProfile = true;
- $timeout(function() {
- $scope.init();
- }, 3000);
- } else {
- $scope.error = "";
- $scope.noProfile = false;
- }
- });
- });
- };
+// create();
});
diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js
index dd359e663..da6a734b5 100644
--- a/src/js/controllers/index.js
+++ b/src/js/controllers/index.js
@@ -1295,17 +1295,14 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$rootScope.$on('Local/NewFocusedWallet', function() {
self.setFocusedWallet();
self.updateTxHistory();
- storageService.getCopayDisclaimerFlag(function(err, val) {
- if (val) go.walletHome();
- storageService.getCleanAndScanAddresses(function(err, walletId) {
- if (walletId && profileService.walletClients[walletId]) {
- $log.debug('Clear last address cache and Scan ', walletId);
- addressService.expireAddress(walletId, function(err) {
- self.startScan(walletId);
- });
- storageService.removeCleanAndScanAddresses(function() {});
- }
- });
+ storageService.getCleanAndScanAddresses(function(err, walletId) {
+ if (walletId && profileService.walletClients[walletId]) {
+ $log.debug('Clear last address cache and Scan ', walletId);
+ addressService.expireAddress(walletId, function(err) {
+ self.startScan(walletId);
+ });
+ storageService.removeCleanAndScanAddresses(function() {});
+ }
});
});
diff --git a/src/js/routes.js b/src/js/routes.js
index 44f7ca551..12e51be4c 100644
--- a/src/js/routes.js
+++ b/src/js/routes.js
@@ -75,17 +75,6 @@ angular
// link: http://stackoverflow.com/questions/15606751/angular-changes-urls-to-unsafe-in-extension-page?lq=1
$compileProvider.imgSrcSanitizationWhitelist(/^\s*((https?|ftp|file|blob|chrome-extension):|data:image\/)/);
- $stateProvider
- .state('splash', {
- url: '/splash',
- needProfile: false,
- views: {
- 'main': {
- templateUrl: 'views/splash.html',
- }
- }
- });
-
$stateProvider
.state('translators', {
url: '/translators',
@@ -521,9 +510,6 @@ angular
if (err) {
if (err.message && err.message.match('NOPROFILE')) {
$log.debug('No profile... redirecting');
- $state.transitionTo('splash');
- } else if (err.message && err.message.match('NONAGREEDDISCLAIMER')) {
- $log.debug('Display disclaimer... redirecting');
$state.transitionTo('disclaimer');
} else {
throw new Error(err); // TODO
diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js
index f159deeaf..1770ea751 100644
--- a/src/js/services/profileService.js
+++ b/src/js/services/profileService.js
@@ -134,32 +134,26 @@ angular.module('copayApp.services')
};
root.loadAndBindProfile = function(cb) {
- storageService.getCopayDisclaimerFlag(function(err, val) {
- if (!val) {
- return cb(new Error('NONAGREEDDISCLAIMER: Non agreed disclaimer'));
- } else {
- storageService.getProfile(function(err, profile) {
- if (err) {
- $rootScope.$emit('Local/DeviceError', err);
- return cb(err);
- }
- if (!profile) {
- // Migration??
- storageService.tryToMigrate(function(err, migratedProfile) {
- if (err) return cb(err);
- if (!migratedProfile)
- return cb(new Error('NOPROFILE: No profile'));
-
- profile = migratedProfile;
- return root.bindProfile(profile, cb);
- })
- } else {
- $log.debug('Profile read');
- return root.bindProfile(profile, cb);
- }
-
- });
+ storageService.getProfile(function(err, profile) {
+ if (err) {
+ $rootScope.$emit('Local/DeviceError', err);
+ return cb(err);
}
+ if (!profile) {
+ // Migration??
+ storageService.tryToMigrate(function(err, migratedProfile) {
+ if (err) return cb(err);
+ if (!migratedProfile)
+ return cb(new Error('NOPROFILE: No profile'));
+
+ profile = migratedProfile;
+ return root.bindProfile(profile, cb);
+ })
+ } else {
+ $log.debug('Profile read');
+ return root.bindProfile(profile, cb);
+ }
+
});
};
@@ -276,8 +270,8 @@ angular.module('copayApp.services')
// check if exist
if (lodash.find(root.profile.credentials, {
- 'walletId': walletData.walletId
- })) {
+ 'walletId': walletData.walletId
+ })) {
return cb(gettext('Cannot join the same wallet more that once'));
}
} catch (ex) {
diff --git a/src/js/services/storageService.js b/src/js/services/storageService.js
index b9c2deb0e..9178cb69c 100644
--- a/src/js/services/storageService.js
+++ b/src/js/services/storageService.js
@@ -199,14 +199,6 @@ angular.module('copayApp.services')
storage.remove('config', cb);
};
- root.setCopayDisclaimerFlag = function(cb) {
- storage.set('agreeDisclaimer', true, cb);
- };
-
- root.getCopayDisclaimerFlag = function(cb) {
- storage.get('agreeDisclaimer', cb);
- };
-
root.setRemotePrefsStoredFlag = function(cb) {
storage.set('remotePrefStored', true, cb);
};