From b1d4e6224cc104a28c336dc07973d3817ac64052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Mon, 16 Nov 2015 12:00:10 -0300 Subject: [PATCH 01/10] license and profile creation in the same view --- public/views/disclaimer.html | 116 +++++++++++++++++++------------ public/views/splash.html | 43 ------------ src/css/main.css | 5 +- src/js/controllers/disclaimer.js | 31 ++++++--- src/js/controllers/splash.js | 35 ---------- 5 files changed, 97 insertions(+), 133 deletions(-) delete mode 100644 public/views/splash.html delete mode 100644 src/js/controllers/splash.js diff --git a/public/views/disclaimer.html b/public/views/disclaimer.html index 5b988b940..8197a5d44 100644 --- a/public/views/disclaimer.html +++ b/public/views/disclaimer.html @@ -1,47 +1,71 @@ -
-
-
- -
-

-
Copay
-
Terms of Use
-

-
-

-

    -
  • The software you are about to use functions as a free, open source, and multi-signature digital wallet.
  • -
  • The software does not constitute an account where BitPay or other third parties serve as financial intermediaries or custodians of your bitcoin.
  • -
  • While the software has undergone beta testing and continues to be improved by feedback from the open-source user and developer community, we cannot guarantee that there will be no bugs in the software.
  • -
  • You acknowledge that your use of this software is at your own discretion and in compliance with all applicable laws.
  • -
  • You are responsible for safekeeping your passwords, private key pairs, PINs and any other codes you use to access the software.
  • -
  • IF YOU LOSE ACCESS TO YOUR COPAY WALLET OR YOUR ENCRYPTED PRIVATE KEYS AND YOU HAVE NOT SEPARATELY STORED A BACKUP OF YOUR WALLET AND CORRESPONDING PASSWORD, YOU ACKNOWLEDGE AND AGREE THAT ANY BITCOIN YOU HAVE ASSOCIATED WITH THAT COPAY WALLET WILL BECOME INACCESSIBLE.
  • -
  • All transaction requests are irreversible.
  • -
  • The authors of the software, employees and affiliates of Bitpay, copyright holders, and BitPay, Inc. cannot retrieve your private keys or passwords if you lose or forget them and cannot guarantee transaction confirmation as they do not have control over the Bitcoin network.
  • -
  • To the fullest extent permitted by law, this software is provided “as is” and no representations or warranties can be made of any kind, express or implied, including but not limited to the warranties of merchantability, fitness or a particular purpose and noninfringement.
  • -
  • You assume any and all risks associated with the use of the software.
  • -
  • In no event shall the authors of the software, employees and affiliates of Bitpay, copyright holders, or BitPay, Inc. be held liable for any claim, damages or other liability, whether in an action of contract, tort, or otherwise, arising from, out of or in connection with the software.
  • -
  • We reserve the right to modify this disclaimer from time to time.
  • -
-

-

- Official English Disclaimer -

- -
-

I affirm that I have read, understood, and agree with these terms.

- -
- -
-
-
+
+
+
+
+
+ WELCOME TO COPAY +

A multisignature bitcoin wallet

+
+
+
+
+
+ icon +
+
+
+

+

    +
  • The software you are about to use functions as a free, open source, and multi-signature digital wallet.
  • +
  • The software does not constitute an account where BitPay or other third parties serve as financial intermediaries or custodians of your bitcoin.
  • +
  • While the software has undergone beta testing and continues to be improved by feedback from the open-source user and developer community, we cannot guarantee that there will be no bugs in the software.
  • +
  • You acknowledge that your use of this software is at your own discretion and in compliance with all applicable laws.
  • +
  • You are responsible for safekeeping your passwords, private key pairs, PINs and any other codes you use to access the software.
  • +
  • IF YOU LOSE ACCESS TO YOUR COPAY WALLET OR YOUR ENCRYPTED PRIVATE KEYS AND YOU HAVE NOT SEPARATELY STORED A BACKUP OF YOUR WALLET AND CORRESPONDING PASSWORD, YOU ACKNOWLEDGE AND AGREE THAT ANY BITCOIN YOU HAVE ASSOCIATED WITH THAT COPAY WALLET WILL BECOME INACCESSIBLE.
  • +
  • All transaction requests are irreversible.
  • +
  • The authors of the software, employees and affiliates of Bitpay, copyright holders, and BitPay, Inc. cannot retrieve your private keys or passwords if you lose or forget them and cannot guarantee transaction confirmation as they do not have control over the Bitcoin network.
  • +
  • To the fullest extent permitted by law, this software is provided “as is” and no representations or warranties can be made of any kind, express or implied, including but not limited to the warranties of merchantability, fitness or a particular purpose and noninfringement.
  • +
  • You assume any and all risks associated with the use of the software.
  • +
  • In no event shall the authors of the software, employees and affiliates of Bitpay, copyright holders, or BitPay, Inc. be held liable for any claim, damages or other liability, whether in an action of contract, tort, or otherwise, arising from, out of or in connection with the software.
  • +
  • We reserve the right to modify this disclaimer from time to time.
  • +
+

+
+
+
+
+ {{(error)|translate}}. Retrying... +
+
+
+
+
+
+
+
+
+
+ Creating Profile... +
+
+ +
+

I affirm that I have read, understood, and agree with these terms.

+
+
+
+ +

Already have a wallet?

+ +
+
+
diff --git a/public/views/splash.html b/public/views/splash.html deleted file mode 100644 index 6354688bd..000000000 --- a/public/views/splash.html +++ /dev/null @@ -1,43 +0,0 @@ -
-
-
-
-
- WELCOME TO COPAY -

A multisignature bitcoin wallet

-
-
-
-
-
- icon -
-
-
- {{(error)|translate}}. Retrying... -
-
-
-
-
-
-
-
-
-
- Creating Profile... -
-
-
-
- -

Already have a wallet?

- -
-
-
-
diff --git a/src/css/main.css b/src/css/main.css index 9767bbd71..a817b3ac7 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -7,7 +7,6 @@ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; } - .panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6, .panel p, .panel li, .panel dl { color: #2C3E50; } @@ -1094,6 +1093,10 @@ input.ng-invalid-match, input.ng-invalid-match:focus { } /*/////////////////////////////////////////////////*/ +.scrollArea { + height: 280px; + overflow: scroll; +} .tabbable { border: 2px solid #213140; diff --git a/src/js/controllers/disclaimer.js b/src/js/controllers/disclaimer.js index 88533fd31..f1cedcc71 100644 --- a/src/js/controllers/disclaimer.js +++ b/src/js/controllers/disclaimer.js @@ -1,29 +1,44 @@ 'use strict'; angular.module('copayApp.controllers').controller('disclaimerController', - function($scope, $timeout, storageService, applicationService, gettextCatalog, isCordova, uxLanguage) { + function($scope, $timeout, $log, profileService, isCordova, storageService, gettextCatalog, uxLanguage, go) { - $scope.agree = function() { + $scope.create = function(noWallet) { + $scope.creatingProfile = true; if (isCordova) { window.plugins.spinnerDialog.show(null, gettextCatalog.getString('Loading...'), true); } $scope.loading = true; $timeout(function() { storageService.setCopayDisclaimerFlag(function(err) { - $timeout(function() { - if (isCordova) { - window.plugins.spinnerDialog.hide(); + if (isCordova) { + window.plugins.spinnerDialog.hide(); + } + profileService.create({ + noWallet: noWallet + }, function(err) { + if (err) { + $scope.creatingProfile = false; + $log.warn(err); + $scope.error = err; + $scope.$apply(); + $timeout(function() { + $scope.create(noWallet); + }, 3000); } - applicationService.restart(); - }, 1000); + }); }); }, 100); }; - + $scope.init = function() { storageService.getCopayDisclaimerFlag(function(err, val) { $scope.lang = uxLanguage.currentLanguage; $scope.agreed = val; + + if (profileService.profile) { + go.walletHome(); + } $timeout(function() { $scope.$digest(); }, 1); diff --git a/src/js/controllers/splash.js b/src/js/controllers/splash.js deleted file mode 100644 index b52b2d443..000000000 --- a/src/js/controllers/splash.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('splashController', - function($scope, $timeout, $log, profileService, storageService, go) { - - $scope.create = function(noWallet) { - $scope.creatingProfile = true; - - $timeout(function() { - profileService.create({ - noWallet: noWallet - }, function(err) { - if (err) { - $scope.creatingProfile = false; - $log.warn(err); - $scope.error = err; - $scope.$apply(); - $timeout(function() { - $scope.create(noWallet); - }, 3000); - } - }); - }, 100); - }; - - $scope.init = function() { - storageService.getCopayDisclaimerFlag(function(err, val) { - if (!val) go.path('disclaimer'); - - if (profileService.profile) { - go.walletHome(); - } - }); - }; - }); From f2375a7bac16a0eaf41179cad18d9517345c20de Mon Sep 17 00:00:00 2001 From: bechi Date: Mon, 16 Nov 2015 17:04:46 -0300 Subject: [PATCH 02/10] add style on disclaimer --- public/views/disclaimer.html | 28 ++++++++++++---------------- src/css/main.css | 14 +++++++++++++- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/public/views/disclaimer.html b/public/views/disclaimer.html index 8197a5d44..aed44567e 100644 --- a/public/views/disclaimer.html +++ b/public/views/disclaimer.html @@ -1,22 +1,20 @@ -
-
-
- WELCOME TO COPAY -

A multisignature bitcoin wallet

-
-
-
-
-
+
icon
+
+
+ WELCOME TO COPAY +

A multisignature bitcoin wallet

+
+
-

+

  • The software you are about to use functions as a free, open source, and multi-signature digital wallet.
  • The software does not constitute an account where BitPay or other third parties serve as financial intermediaries or custodians of your bitcoin.
  • @@ -56,15 +54,13 @@

-

I affirm that I have read, understood, and agree with these terms.

+

I affirm that I have read, understood, and agree with these terms.

-
+
-

Already have a wallet?

-
diff --git a/src/css/main.css b/src/css/main.css index a817b3ac7..bb4cf5588 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -1096,6 +1096,18 @@ input.ng-invalid-match, input.ng-invalid-match:focus { .scrollArea { height: 280px; overflow: scroll; + background: #213140; + border: 1px solid #4B6178; + border-radius: 5px; + margin: 1.6rem; + color: #A5B2BF; + line-height: 30px; + padding: 0.5rem; +} + +.scrollArea ul { + font-size: 0.8rem; + text-align: left; } .tabbable { @@ -1203,7 +1215,7 @@ input.ng-invalid-match, input.ng-invalid-match:focus { } .splash .container-image { - padding: 2rem 0; + padding: 1rem 0; } .preferences li { From 8217c7bfbd4146c7d30ff68cd851605d384c862c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 17 Nov 2015 11:10:09 -0300 Subject: [PATCH 03/10] create profile before accepting terms --- src/js/controllers/disclaimer.js | 50 ++++++++++++++------------------ src/js/controllers/index.js | 26 +++++++++-------- 2 files changed, 35 insertions(+), 41 deletions(-) diff --git a/src/js/controllers/disclaimer.js b/src/js/controllers/disclaimer.js index f1cedcc71..0ad075bca 100644 --- a/src/js/controllers/disclaimer.js +++ b/src/js/controllers/disclaimer.js @@ -1,47 +1,39 @@ 'use strict'; angular.module('copayApp.controllers').controller('disclaimerController', - function($scope, $timeout, $log, profileService, isCordova, storageService, gettextCatalog, uxLanguage, go) { + function($scope, $timeout, $log, profileService, isCordova, storageService, gettextCatalog, applicationService, uxLanguage, go) { - $scope.create = function(noWallet) { + + $scope.create = function() { $scope.creatingProfile = true; if (isCordova) { window.plugins.spinnerDialog.show(null, gettextCatalog.getString('Loading...'), true); } $scope.loading = true; - $timeout(function() { - storageService.setCopayDisclaimerFlag(function(err) { - if (isCordova) { - window.plugins.spinnerDialog.hide(); - } - profileService.create({ - noWallet: noWallet - }, function(err) { - if (err) { - $scope.creatingProfile = false; - $log.warn(err); - $scope.error = err; - $scope.$apply(); - $timeout(function() { - $scope.create(noWallet); - }, 3000); - } - }); - }); - }, 100); + storageService.setCopayDisclaimerFlag(function(err) { + $scope.creatingProfile = false; + if (isCordova) { + window.plugins.spinnerDialog.hide(); + } + applicationService.restart(); + }); }; - $scope.init = function() { + $scope.init = function(noWallet) { storageService.getCopayDisclaimerFlag(function(err, val) { $scope.lang = uxLanguage.currentLanguage; $scope.agreed = val; - if (profileService.profile) { - go.walletHome(); - } - $timeout(function() { - $scope.$digest(); - }, 1); + profileService.create({ + noWallet: noWallet + }, function(err) { + if (err) { + $log.warn(err); + $scope.error = err; + $scope.$apply(); + } + }); }); }; + }); diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index 3dcedc4ae..dd359e663 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -142,7 +142,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r var defaults = configService.getDefaults(); var config = configService.getSync(); - self.usingCustomBWS = config.bwsFor && config.bwsFor[self.walletId] && (config.bwsFor[self.walletId] != defaults.bws.url); + self.usingCustomBWS = config.bwsFor && config.bwsFor[self.walletId] && (config.bwsFor[self.walletId] != defaults.bws.url); }; self.setTab = function(tab, reset, tries, switchState) { @@ -807,7 +807,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r return i_cb(null, newTxs); } - if (walletId == profileService.focusedClient.credentials.walletId) + if (walletId == profileService.focusedClient.credentials.walletId) self.txProgress = newTxs.length; $timeout(function() { @@ -822,7 +822,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r var newHistory = lodash.compact(txs.concat(txsFromLocal)); $log.debug('Tx History synced. Total Txs: ' + newHistory.length); - if (walletId == profileService.focusedClient.credentials.walletId) { + if (walletId == profileService.focusedClient.credentials.walletId) { self.completeHistory = newHistory; self.txHistory = newHistory.slice(0, self.historyShowLimit); self.historyShowShowAll = newHistory.length >= self.historyShowLimit; @@ -1295,15 +1295,17 @@ angular.module('copayApp.controllers').controller('indexController', function($r $rootScope.$on('Local/NewFocusedWallet', function() { self.setFocusedWallet(); self.updateTxHistory(); - 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.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() {}); + } + }); }); }); From 04e989ce44398e6fde162f0d38c63ac6b71c3a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 17 Nov 2015 12:39:51 -0300 Subject: [PATCH 04/10] error handling --- public/views/disclaimer.html | 2 +- src/js/controllers/disclaimer.js | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/public/views/disclaimer.html b/public/views/disclaimer.html index aed44567e..b6f97f477 100644 --- a/public/views/disclaimer.html +++ b/public/views/disclaimer.html @@ -58,7 +58,7 @@
-
diff --git a/src/js/controllers/disclaimer.js b/src/js/controllers/disclaimer.js index 0ad075bca..8e038aee4 100644 --- a/src/js/controllers/disclaimer.js +++ b/src/js/controllers/disclaimer.js @@ -2,19 +2,11 @@ angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $log, profileService, isCordova, storageService, gettextCatalog, applicationService, uxLanguage, go) { - + self = this; + $scope.noProfile = true; $scope.create = function() { - $scope.creatingProfile = true; - if (isCordova) { - window.plugins.spinnerDialog.show(null, gettextCatalog.getString('Loading...'), true); - } - $scope.loading = true; storageService.setCopayDisclaimerFlag(function(err) { - $scope.creatingProfile = false; - if (isCordova) { - window.plugins.spinnerDialog.hide(); - } applicationService.restart(); }); }; @@ -27,10 +19,17 @@ angular.module('copayApp.controllers').controller('disclaimerController', profileService.create({ noWallet: noWallet }, function(err) { - if (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; } }); }); From 1e418ef0604b232525a67eb6d00704f3d5162a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 17 Nov 2015 12:42:15 -0300 Subject: [PATCH 05/10] delete creating profile flag --- public/views/disclaimer.html | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/public/views/disclaimer.html b/public/views/disclaimer.html index b6f97f477..4dd615f7b 100644 --- a/public/views/disclaimer.html +++ b/public/views/disclaimer.html @@ -33,21 +33,9 @@
-
+
{{(error)|translate}}. Retrying...
-
-
-
-
-
-
-
-
-
- Creating Profile... -
-

Official English Disclaimer @@ -56,7 +44,7 @@

I affirm that I have read, understood, and agree with these terms.

-
+
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); }; From c1d19a29739f658be5f2ada488c0a725df4a580d Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 17 Nov 2015 14:03:03 -0300 Subject: [PATCH 07/10] add title and button text --- public/views/disclaimer.html | 3 ++- src/css/main.css | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/views/disclaimer.html b/public/views/disclaimer.html index a75ce92c2..65ee16367 100644 --- a/public/views/disclaimer.html +++ b/public/views/disclaimer.html @@ -12,6 +12,7 @@
+
Terms of Use

    @@ -49,7 +50,7 @@
diff --git a/src/css/main.css b/src/css/main.css index 16b0b35b1..bbc8e4ac7 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -1099,7 +1099,7 @@ input.ng-invalid-match, input.ng-invalid-match:focus { background: #213140; border: 1px solid #4B6178; border-radius: 5px; - margin: 1.6rem; + margin: 0 1.6rem 1.6rem 1.6rem; color: #A5B2BF; line-height: 30px; padding: 0.5rem; From 3fb2086407d211bf222d06610270f36a49c9e763 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 17 Nov 2015 14:10:41 -0300 Subject: [PATCH 08/10] move title inside the scrolable area --- public/views/disclaimer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/views/disclaimer.html b/public/views/disclaimer.html index 65ee16367..9c4cd2a92 100644 --- a/public/views/disclaimer.html +++ b/public/views/disclaimer.html @@ -12,9 +12,9 @@
-
Terms of Use

+

Terms of Use
  • The software you are about to use functions as a free, open source, and multi-signature digital wallet.
  • The software does not constitute an account where BitPay or other third parties serve as financial intermediaries or custodians of your bitcoin.
  • From 25300a1c4af9b41dc9f62e910f6ca77d7df13bc1 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 17 Nov 2015 14:11:27 -0300 Subject: [PATCH 09/10] fix margins --- src/css/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/main.css b/src/css/main.css index bbc8e4ac7..16b0b35b1 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -1099,7 +1099,7 @@ input.ng-invalid-match, input.ng-invalid-match:focus { background: #213140; border: 1px solid #4B6178; border-radius: 5px; - margin: 0 1.6rem 1.6rem 1.6rem; + margin: 1.6rem; color: #A5B2BF; line-height: 30px; padding: 0.5rem; From e1ce85745b7bf12899b0015066ac1888fdcad8f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 17 Nov 2015 15:49:17 -0300 Subject: [PATCH 10/10] uncomment create function --- src/js/controllers/disclaimer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/disclaimer.js b/src/js/controllers/disclaimer.js index be720f3f9..4d55984cc 100644 --- a/src/js/controllers/disclaimer.js +++ b/src/js/controllers/disclaimer.js @@ -9,13 +9,13 @@ angular.module('copayApp.controllers').controller('disclaimerController', go.walletHome(); }; - var create = function () { + var create = function() { $scope.creatingProfile = true; profileService.create({}, function(err) { if (err) { - if (err == 'EEXISTS') + if (err == 'EEXISTS') return go.walletHome(); $log.warn(err); @@ -32,6 +32,6 @@ angular.module('copayApp.controllers').controller('disclaimerController', }); }; -// create(); + create(); });