Fix address list from receive section. Fix response when delete a wallet.

This commit is contained in:
Gustavo Maximiliano Cortez 2015-02-19 17:02:07 -03:00
commit 174c6cb3de
10 changed files with 130 additions and 127 deletions

View file

@ -33,25 +33,24 @@ angular.module('copayApp.controllers').controller('CopayersController',
};
$scope.deleteWallet = function() {
$scope.loading = true;
identityService.deleteWallet(w, function(err) {
if (err) {
$scope.loading = null;
$scope.error = err.message || err;
copay.logger.warn(err);
$timeout(function() {
$scope.$digest();
});
} else {
$scope.loading = false;
if ($rootScope.wallet) {
go.walletHome();
$rootScope.starting = true;
$timeout(function() {
identityService.deleteWallet(w, function(err) {
$rootScope.starting = false;
if (err) {
$scope.error = err.message || err;
copay.logger.warn(err);
$timeout(function () { $scope.$digest(); });
} else {
if ($rootScope.wallet) {
go.walletHome();
}
$timeout(function() {
notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted');
});
}
$timeout(function() {
notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted');
});
}
});
});
}, 100);
};
$scope.copySecret = function(secret) {

View file

@ -119,22 +119,23 @@ angular.module('copayApp.controllers').controller('MoreController',
$scope.deleteWallet = function() {
$scope.loading = true;
identityService.deleteWallet(w, function(err) {
if (err) {
$scope.loading = null;
$scope.error = err.message || err;
copay.logger.warn(err);
$timeout(function () { $scope.$digest(); });
} else {
$timeout(function() {
identityService.deleteWallet(w, function(err) {
$scope.loading = false;
if ($rootScope.wallet) {
go.walletHome();
if (err) {
$scope.error = err.message || err;
copay.logger.warn(err);
$timeout(function () { $scope.$digest(); });
} else {
if ($rootScope.wallet) {
go.walletHome();
}
$timeout(function() {
notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted');
});
}
$timeout(function() {
notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted');
});
}
});
});
}, 100);
};
$scope.copyText = function(text) {

View file

@ -60,7 +60,7 @@ angular.module('copayApp.controllers').controller('ReceiveController',
$modal.open({
templateUrl: 'views/modals/qr-address.html',
windowClass: 'tiny',
windowClass: 'small',
controller: ModalInstanceCtrl,
resolve: {
address: function() {