Wallet/src/js/controllers/preferencesEmail.js

17 lines
499 B
JavaScript
Raw Normal View History

2015-05-14 17:21:45 -03:00
'use strict';
2016-08-17 15:53:17 -03:00
angular.module('copayApp.controllers').controller('preferencesEmailController', function($rootScope, $scope, $state, $stateParams, profileService, walletService) {
2016-08-16 16:47:51 -03:00
$scope.save = function(form) {
2016-08-17 15:53:17 -03:00
var wallet = profileService.getWallet($stateParams.walletId);
var email = $scope.email || '';
2015-05-14 17:21:45 -03:00
2016-08-17 15:53:17 -03:00
walletService.updateRemotePreferences(wallet, {
email: email,
}, function(err) {
2016-08-17 15:53:17 -03:00
if (err) $log.warn(err);
$state.go('wallet.preferences');
});
};
2016-08-16 16:47:51 -03:00
});