Wallet/src/js/controllers/preferencesEmail.js
2016-08-17 15:53:17 -03:00

17 lines
499 B
JavaScript

'use strict';
angular.module('copayApp.controllers').controller('preferencesEmailController', function($rootScope, $scope, $state, $stateParams, profileService, walletService) {
$scope.save = function(form) {
var wallet = profileService.getWallet($stateParams.walletId);
var email = $scope.email || '';
walletService.updateRemotePreferences(wallet, {
email: email,
}, function(err) {
if (err) $log.warn(err);
$state.go('wallet.preferences');
});
};
});