update to current BWC
This commit is contained in:
parent
7bb6436d09
commit
837f6fced1
4 changed files with 45 additions and 53 deletions
|
|
@ -1,26 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesEmailController',
|
||||
function($scope, go, profileService ,gettext, $log) {
|
||||
function($scope, go, profileService, gettext, $log) {
|
||||
this.save = function(form) {
|
||||
this.error=null;
|
||||
this.error = null;
|
||||
|
||||
if (!form.$valid) {
|
||||
if (!form.$valid && this.email) {
|
||||
this.error = gettext('Invalid email');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('[preferencesEmail.js.12]', this.email); //TODO
|
||||
var fc = profileService.focusedClient;
|
||||
this.saving =true;
|
||||
fc.savePreferences({email:this.email}, function(err) {
|
||||
fc.saving =false;
|
||||
this.saving = true;
|
||||
fc.savePreferences({
|
||||
email: this.email
|
||||
}, function(err) {
|
||||
fc.saving = false;
|
||||
if (err) {
|
||||
$log.warn(err);
|
||||
$scope.$emit('Local/ClientError', err);
|
||||
return;
|
||||
}
|
||||
go.walletHome();
|
||||
$scope.$emit('Local/EmailUpdated', function(err){
|
||||
go.path('preferences');
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue