diff --git a/public/views/devLogin.html b/public/views/devLogin.html deleted file mode 100644 index f58b8d2ee..000000000 --- a/public/views/devLogin.html +++ /dev/null @@ -1,2 +0,0 @@ -
-
diff --git a/public/views/dummy-translations.html b/public/views/dummy-translations.html deleted file mode 100644 index 862444a8f..000000000 --- a/public/views/dummy-translations.html +++ /dev/null @@ -1,62 +0,0 @@ -{{'Receive'|translate}} -{{'History'|translate}} -{{'Wrong password'|translate}} -{{'Copied to clipboard'|translate}} -{{'Please enter the required fields'|translate}} -{{'Import a backup'|translate}} -{{'Importing wallet - Reading backup...'|translate}} -{{'Importing wallet - Setting things up...'|translate}} -{{'Importing wallet - We are almost there...'|translate}} -{{'Error updating indexes:'|translate}} -{{'Please, select your backup file'|translate}} -{{'Please enter the required fields'|translate}} -{{'Fatal error connecting to Insight server'|translate}} -{{'The wallet is full'|translate}} -{{'Wallet network configuration missmatch'|translate}} -{{'The secret string you entered is invalid'|translate}} -{{'Transactions Proposals Purged'|translate}} -{{'transaction proposal purged'|translate}} -{{'Updating balance'|translate}} -{{'Scaning for transactions'|translate}} -{{'Using derived addresses from your wallet'|translate}} -{{'Finished'|translate}} -{{'The balance is updated using the derived addresses'|translate}} -{{'Login Required'|translate}} -{{'Please open wallet to complete payment'|translate}} -{{'Send'|translate}} -{{'Unable to send transaction proposal'|translate}} -{{'The transaction proposal has been created'|translate}} -{{'Form Error'|translate}} -{{'Please complete required fields'|translate}} -{{'Success'|translate}} -{{'New entry has been created'|translate}} -{{'There was an error sending the transaction'|translate}} -{{'Transaction rejected'|translate}} -{{'You rejected the transaction successfully'|translate}} -{{'There was an error signing the transaction'|translate}} -{{'Session will be closed'|translate}} -{{'Your session is about to expire due to inactivity in'|translate}} -{{'seconds'|translate}} -{{'Session closed'|translate}} -{{'Session closed because a long time of inactivity'|translate}} -{{'available.'|translate}} -{{'It\'s important that you update your wallet at https://copay.io'|translate}} -{{'Please update your wallet at https://copay.io'|translate}} -{{'Backup created'|translate}} -{{'Encrypted backup file saved'|translate}} -{{'Networking Error'|translate}} -{{'Could not connect to the Insight server. Check your settings and network configuration'|translate}} -{{'Received corrupt message from '|translate}} -{{'Transaction Update'|translate}} -{{'A transaction was signed by'|translate}} -{{'A transaction was rejected by'|translate}} -{{'Transaction Error'|translate}} -{{'Received corrupt transaction from'|translate}} -{{'New Transaction'|translate}} -{{'You have a pending transaction proposal'|translate}} -{{'You have'|translate}} -{{'pending transaction proposals'|translate}} -{{'Funds received!'|translate}} -{{'Transaction broadcasted'|translate}} -{{'Accessing your profile'|translate}} -{{'Signing out'|translate}} diff --git a/public/views/importProfile.html b/public/views/importProfile.html deleted file mode 100644 index ff6b4ef30..000000000 --- a/public/views/importProfile.html +++ /dev/null @@ -1,67 +0,0 @@ - -
-
-
-
- -
-
-
- Copay -
-
-
-

Import a profile

-
-
-
- -
- - {{error|translate}} - -
- -
-
- -
-
- -
-
- - -
-
-
- - -
- - -
- -
-
-
-
- diff --git a/public/views/profile.html b/public/views/profile.html deleted file mode 100644 index 5f7e70c7b..000000000 --- a/public/views/profile.html +++ /dev/null @@ -1,124 +0,0 @@ -
-
-
-
-
- -
-

- Profile - - [ Needs Backup ] - -

- It's important to backup your profile so that you can recover it in case of disaster. The backup will include all your profile's wallets -
-
-
-
-
- -
-
- - -
-

Backup options

- - -
-
-
- -
-
-

Copy backup in a safe place

-
- - -
-
- - Copy this text as it is in a safe place (notepad or email) -
-
-
- -
-
- -
-
-
- Your current server usage quotas are: {{perItem}}kB per wallet and up to {{nrWallets}} wallets. -
-
- - Confirm your email address to increase storage usage limits. -
-
-
-
- -
- -
- -
- -
-
-
-

- Delete Profile -

-

Permanently delete this profile and all its wallets. WARNING: this action cannot be reversed.

-
- Delete Profile - -
-
-

Are you sure you want to delete this profile?

-
-
- -
-
- -
-
-
-
-
-
-
-
diff --git a/public/views/settings.html b/public/views/settings.html deleted file mode 100644 index b5597c4d2..000000000 --- a/public/views/settings.html +++ /dev/null @@ -1,60 +0,0 @@ -
-

{{$root.title|translate}}

-
-
- Copay -
-
-

Settings

-
-
-
- -
- - {{message|translate}} - -
-
- Bitcore wallet service -
- -
- - Not valid -
-
-
- -
- - - Bitcore wallet service is open-source software. You can run your own instances, check - Github repository - -
- -
- -
-
diff --git a/public/views/signin.html b/public/views/signin.html deleted file mode 100644 index b3a942af5..000000000 --- a/public/views/signin.html +++ /dev/null @@ -1,132 +0,0 @@ -
- - -
-
-
- -
-
-
- -
-
-

Disclaimer

-

- The software you are about to use is free, open source, and unsupported beta software. It is important to understand - that beta software refers to software that is undergoing testing and has not officially been released, could have - bugs, and may not act in a reliable fashion. Because the software is currently in beta, it is possible but not certain - that you may lose bitcoin or the value of your bitcoin. It is recommended that you store only nominal amounts of - bitcoins. 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 login IDs, passwords, private key pairs, PINs and any other - codes you use to access the software. IF YOU HAVE NOT SEPARATELY STORED A BACKUP OF ANY WALLET ADDRESSES AND PRIVATE - KEY PAIRS MAINTAINED IN YOUR ACCOUNT, YOU ACKNOWLEDGE AND AGREE THAT ANY BITCOINS YOU HAVE ASSOCIATED WITH SUCH WALLET - ADDRESSES WILL BECOME INACCESSIBLE IF YOU DO NOT HAVE YOUR ACCOUNT PASSWORD AND/OR PIN. 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. You agree to provide accurate and complete - information in connection with your use of the account. You assume any and all risk associated with the use of the - software. 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. 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 or the use or other dealings in the software. We reserve the right to modify this disclaimer from time to - time. -

- -
-
- -
-
- -
- Copay -
-
- -
-

Enter PIN

-

Set up a PIN

-

Repeat PIN

-
-
- -
- - {{signin.error|translate}} - -
-
-
- -
-

Signin

-
-
- -
-
- Please sign in to make the payment -
-
-
-
-
- -
- - {{error|translate}} - -
- -
- - -
-
- - -
- - - - -
- - -
-
-
-
- - diff --git a/public/views/warning.html b/public/views/warning.html deleted file mode 100644 index 44d40ff74..000000000 --- a/public/views/warning.html +++ /dev/null @@ -1,26 +0,0 @@ -
-
- Copay -
-
-

Warning!

-

- This wallet appears to be currently open. -
- Opening the wallet in multiple browser tabs could lead to unexpected results -

-
-
- -
-
-
-
-
- diff --git a/src/js/controllers/emailConfirmation.js b/src/js/controllers/emailConfirmation.js deleted file mode 100644 index 8ae1d2d0e..000000000 --- a/src/js/controllers/emailConfirmation.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('EmailConfirmationController', function($scope, $rootScope, $location) { - $rootScope.fromEmailConfirmation = true; - $location.path('/'); -}); diff --git a/src/js/controllers/importProfile.js b/src/js/controllers/importProfile.js deleted file mode 100644 index 72d38d122..000000000 --- a/src/js/controllers/importProfile.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('importProfileController', - function($scope, $rootScope, $timeout, notification, isMobile, isCordova, identityService) { - this.importStatus = 'Importing profile - Reading backup...'; - this.hideAdv = true; - this.isSafari = isMobile.Safari(); - this.isCordova = isCordova; - - window.ignoreMobilePause = true; - $scope.$on('$destroy', function() { - $timeout(function(){ - window.ignoreMobilePause = false; - }, 100); - }); - - var reader = new FileReader(); - - var updateStatus = function(status) { - this.importStatus = status; - } - - var _importBackup = function(str) { - var password = this.password; - updateStatus('Importing profile - Setting things up...'); - - identityService.importProfile(str,password, function(err, iden) { - if (err) { - $rootScope.starting = false; - copay.logger.warn(err); - if ((err.toString() || '').match('BADSTR')) { - this.error = 'Bad password or corrupt profile file'; - } else if ((err.toString() || '').match('EEXISTS')) { - this.error = 'Profile already exists'; - } else { - this.error = 'Unknown error'; - } - $timeout(function() { - $rootScope.$digest(); - }, 1); - } - }); - }; - - this.getFile = function() { - // If we use onloadend, we need to check the readyState. - reader.onloadend = function(evt) { - if (evt.target.readyState == FileReader.DONE) { // DONE == 2 - var encryptedObj = evt.target.result; - _importBackup(encryptedObj); - } - }; - }; - - this.import = function(form) { - - if (form.$invalid) { - this.error = 'Please enter the required fields'; - return; - } - var backupFile = this.file; - var backupText = form.backupText.$modelValue; - var password = form.password.$modelValue; - - if (!backupFile && !backupText) { - this.error = 'Please, select your backup file'; - return; - } - - $rootScope.starting = true; - - $timeout(function() { - - if (backupFile) { - reader.readAsBinaryString(backupFile); - } else { - _importBackup(backupText); - } - }, 100); - }; - }); diff --git a/src/js/controllers/profile.js b/src/js/controllers/profile.js deleted file mode 100644 index b7d39ffc7..000000000 --- a/src/js/controllers/profile.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; -angular.module('copayApp.controllers').controller('ProfileController', function($scope, $rootScope, $location, $modal, $filter, $timeout, backupService, identityService, isMobile, isCordova, notification) { - $scope.username = $rootScope.iden.getName(); - $scope.isSafari = isMobile.Safari(); - $scope.isCordova = isCordova; - - $rootScope.title = 'Profile'; - $scope.hideAdv = true; - - $scope.downloadProfileBackup = function() { - backupService.profileDownload($rootScope.iden); - }; - - $scope.viewProfileBackup = function() { - $scope.loading = true; - $timeout(function() { - $scope.backupProfilePlainText = backupService.profileEncrypted($rootScope.iden); - }, 100); - }; - - $scope.copyProfileBackup = function() { - var ep = backupService.profileEncrypted($rootScope.iden); - window.cordova.plugins.clipboard.copy(ep); - window.plugins.toast.showShortCenter('Copied to clipboard'); - }; - - $scope.sendProfileBackup = function() { - if (isMobile.Android() || isMobile.Windows()) { - window.ignoreMobilePause = true; - } - window.plugins.toast.showShortCenter('Preparing backup...'); - var name = $rootScope.iden.fullName; - var ep = backupService.profileEncrypted($rootScope.iden); - var properties = { - subject: 'Copay Profile Backup: ' + name, - body: 'Here is the encrypted backup of the profile ' + name + ': \n\n' + ep + '\n\n To import this backup, copy all text between {...}, including the symbols {}', - isHtml: false - }; - window.plugin.email.open(properties); - }; - - $scope.init = function() { - if ($rootScope.quotaPerItem) { - $scope.perItem = $filter('noFractionNumber')($rootScope.quotaPerItem / 1000, 1); - $scope.nrWallets = parseInt($rootScope.quotaItems) - 1; - } - // no need to add event handlers here. Wallet deletion is handle by callback. - }; - - $scope.deleteProfile = function() { - $scope.loading = true; - identityService.deleteProfile(function(err, res) { - $scope.loading = false; - if (err) { - log.warn(err); - notification.error('Error', 'Could not delete profile'); - $timeout(function() { - $scope.$digest(); - }); - } else { - $location.path('/'); - $timeout(function() { - notification.success('Success', 'Profile successfully deleted'); - }); - } - }); - }; -}); diff --git a/src/js/controllers/settings.js b/src/js/controllers/settings.js deleted file mode 100644 index c494f859b..000000000 --- a/src/js/controllers/settings.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('settingsController', function(configService, applicationService) { - var config; - - this.init = function() { - config = configService.get(); - this.bws = config.bws.url; - }; - - this.save = function() { - if (!this.bws) return; - config.bws.url = this.bws; - var res = configService.set(config); - if (res) { - applicationService.restart(); - } - }; - - this.reset = function() { - if (configService.reset()) { - applicationService.restart(); - } - }; - -}); diff --git a/src/js/controllers/signOut.js b/src/js/controllers/signOut.js deleted file mode 100644 index 5bc2258ed..000000000 --- a/src/js/controllers/signOut.js +++ /dev/null @@ -1,5 +0,0 @@ -angular.module('copayApp.controllers').controller('signOutController', function(identityService) { - - identityService.signout(); - -}); diff --git a/src/js/controllers/signin.js b/src/js/controllers/signin.js deleted file mode 100644 index 1dd083686..000000000 --- a/src/js/controllers/signin.js +++ /dev/null @@ -1,174 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('signinController', - function($rootScope, $timeout, $window, go, notification, profileService, pinService, applicationService, isMobile, isCordova, localStorageService) { - - var KEY = 'CopayDisclaimer'; - var _credentials; - - this.init = function() { - this.isMobile = isMobile.any(); - this.isWindowsPhoneApp = isMobile.Windows() && isCordova; - this.hideForWP = 0; - this.attempt = 0; - this.digits = []; - this.defined = []; - this.askForPin = 0; - - // This is only for backwards compat, insight api should link to #!/confirmed directly - if (getParam('confirmed')) { - var hashIndex = window.location.href.indexOf('/?'); - window.location = window.location.href.substr(0, hashIndex) + '#!/confirmed'; - return; - } - - if ($rootScope.fromEmailConfirmation) { - this.confirmedEmail = true; - $rootScope.fromEmailConfirmation = false; - } - - if ($rootScope.wallet) { - go.walletHome(); - } - - }; - - this.clear = function() { - pinService.clearPin(this); - }; - - this.press = function(digit) { - pinService.pressPin(this, digit); - }; - - this.skip = function() { - pinService.skipPin(this); - }; - - this.agreeDisclaimer = function() { - if (localStorageService.set(KEY, true)) { - this.showDisclaimer = null; - } - }; - - this.formFocus = function() { - if (this.isWindowsPhoneApp) { - this.hideForWP = true; - $timeout(function() { - this.$digest(); - }, 1); - } - }; - - this.openWithPin = function(pin) { - - if (!pin) { - this.error = 'Please enter the required fields'; - return; - } - $rootScope.starting = true; - - $timeout(function() { - var credentials = pinService.get(pin, function(err, credentials) { - if (err || !credentials) { - $rootScope.starting = null; - this.error = 'Wrong PIN'; - this.clear(); - $timeout(function() { - this.error = null; - }, 2000); - return; - } - this.open(credentials.email, credentials.password); - }); - }, 100); - }; - - this.openWallets = function() { - var iden = $rootScope.iden; - $rootScope.hideNavigation = false; - $rootScope.starting = true; - iden.openWallets(); - }; - - this.createPin = function(pin) { - preconditions.checkArgument(pin); - preconditions.checkState($rootScope.iden); - preconditions.checkState(_credentials && _credentials.email); - $rootScope.starting = true; - - $timeout(function() { - pinService.save(pin, _credentials.email, _credentials.password, function(err) { - _credentials.password = ''; - _credentials = null; - this.askForPin = 0; - $rootScope.hasPin = true; - $rootScope.starting = null; - this.openWallets(); - }); - }, 100); - }; - - this.openWithCredentials = function(form) { - if (form && form.$invalid) { - this.error = 'Please enter the required fields'; - return; - } - - this.open(form.email.$modelValue, form.password.$modelValue); - }; - - - this.pinLogout = function() { - pinService.clear(function() { - copay.logger.debug('PIN erased'); - delete $rootScope['hasPin']; - applicationService.restart(); - }); - }; - - this.open = function(username, password) { - $rootScope.starting = true; - profileService.open(username, password, function(err) { - if (err) { - $rootScope.starting = false; - $rootScope.hasPin = false; - pinService.clear(function() {}); - this.error = 'Unknown error'; - return; - } - - // mobile - if (this.isMobile && !$rootScope.hasPin) { - _credentials = { - email: email, - password: password, - }; - this.askForPin = 1; - $rootScope.starting = false; - $rootScope.hideNavigation = true; - $timeout(function() { - $rootScope.$digest(); - }, 1); - } - // no mobile - else { - // this.openWallets(); - } - }); - }; - - function getParam(sname) { - var params = location.search.substr(location.search.indexOf("?") + 1); - var sval = ""; - params = params.split("&"); - // split param and value into individual pieces - for (var i = 0; i < params.length; i++) { - var temp = params[i].split("="); - if ([temp[0]] == sname) { - sval = temp[1]; - } - } - return sval; - } - }); diff --git a/src/js/controllers/unsupported.js b/src/js/controllers/unsupported.js deleted file mode 100644 index ff2dcac3b..000000000 --- a/src/js/controllers/unsupported.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('unsupportedController', function($state) { - if (localStorage && localStorage.length > 0) { - $state.go('signin'); - } -}); diff --git a/src/js/controllers/walletForPayment.js b/src/js/controllers/walletForPayment.js deleted file mode 100644 index 497d075e4..000000000 --- a/src/js/controllers/walletForPayment.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -angular.module('copayApp.controllers').controller('walletForPaymentController', function($rootScope, $scope, $modal, identityService, go) { - - // INIT: (not it a function, since there is no associated html) - - var ModalInstanceCtrl = function($scope, $modalInstance, identityService) { - $scope.loading = true; - preconditions.checkState($rootScope.iden); - - var iden = $rootScope.iden; - iden.on('newWallet', function() { - $scope.setWallets(); - }); - - $scope.setWallets = function() { - $scope.wallets = $rootScope.iden.getWallets(); - }; - - $scope.ok = function(w) { - $modalInstance.close(w); - }; - - $scope.cancel = function() { - $rootScope.pendingPayment = null; - $modalInstance.close(); - }; - }; - - var modalInstance = $modal.open({ - templateUrl: 'views/modals/walletSelection.html', - windowClass: 'full', - controller: ModalInstanceCtrl, - }); - - modalInstance.result.then(function(w) { - if (w) { - identityService.setFocusedWallet(w); - $rootScope.walletForPaymentSet = true; - } else { - $rootScope.pendingPayment = null; - } - go.walletHome(); - }, function() { - $rootScope.pendingPayment = null; - go.walletHome(); - }); -}); diff --git a/src/js/controllers/warning.js b/src/js/controllers/warning.js deleted file mode 100644 index 62f42b94b..000000000 --- a/src/js/controllers/warning.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; -angular.module('copayApp.controllers').controller('WarningController', function($scope, $rootScope, $location, identityService) { - - $scope.checkLock = function() { - if (!$rootScope.tmp || !$rootScope.tmp.getLock()) { - console.log('[warning.js.7] TODO LOCK'); //TODO - } - }; - - $scope.signout = function() { - identityService.signout(); - }; - - $scope.ignoreLock = function() { - var w = $rootScope.tmp; - delete $rootScope['tmp']; - - if (!w) { - $location.path('/'); - } else { - w.ignoreLock = 1; - $scope.loading = true; - //controllerUtils.startNetwork(w, $scope); - // TODO - } - }; -});