refactor profileService

This commit is contained in:
Matias Alejo Garcia 2016-06-06 12:21:15 -03:00
commit 4865ea8ad8
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
9 changed files with 241 additions and 204 deletions

View file

@ -54,15 +54,15 @@ angular.module('copayApp.controllers').controller('copayersController',
modalInstance.result.then(function(ok) {
if (ok) {
_deleteWallet();
doDeleteWallet();
}
});
};
var _deleteWallet = function() {
var doDeleteWallet = function() {
var fc = profileService.focusedClient;
var walletName = fc.credentials.walletName;
profileService.deleteWalletFC({}, function(err) {
profileService.deleteWalletClient(fc, function(err) {
if (err) {
self.error = err.message || err;
$timeout(function() {