delete fc from preferences
This commit is contained in:
parent
965619740b
commit
4e599c38e7
24 changed files with 173 additions and 243 deletions
|
|
@ -1,17 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesEmailController', function($rootScope, $scope, go, profileService, walletService) {
|
||||
angular.module('copayApp.controllers').controller('preferencesEmailController', function($rootScope, $scope, $state, $stateParams, profileService, walletService) {
|
||||
|
||||
$scope.save = function(form) {
|
||||
var fc = profileService.focusedClient;
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
var email = $scope.email || '';
|
||||
|
||||
walletService.updateRemotePreferences(fc, {
|
||||
walletService.updateRemotePreferences(wallet, {
|
||||
email: email,
|
||||
}, function(err) {
|
||||
if (!err)
|
||||
$rootScope.$emit('Local/EmailUpdated', email);
|
||||
go.path('preferences');
|
||||
if (err) $log.warn(err);
|
||||
$state.go('wallet.preferences');
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue