Wallet/src/js/controllers/preferencesEmail.js

21 lines
562 B
JavaScript
Raw Normal View History

2015-05-14 17:21:45 -03:00
'use strict';
angular.module('copayApp.controllers').controller('preferencesEmailController',
2016-06-06 18:26:45 -03:00
function($rootScope, go, profileService, gettext, $log, walletService) {
2015-05-14 17:21:45 -03:00
this.save = function(form) {
2015-05-19 15:30:49 -03:00
var self = this;
2015-05-19 14:10:47 -03:00
this.error = null;
2015-05-14 17:21:45 -03:00
var fc = profileService.focusedClient;
2016-06-06 18:26:45 -03:00
var email = self.email || '';
walletService.updateRemotePreferences(fc, {
email: email,
}, function(err) {
if (!err)
$rootScope.$emit('Local/EmailUpdated', email);
2015-06-29 21:46:34 -03:00
go.path('preferences');
2015-05-14 17:21:45 -03:00
});
};
});