Uses popupService

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-01 10:56:13 -03:00
commit 92bb8e01bc
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
19 changed files with 64 additions and 164 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, platformInfo, walletService, profileService, configService, lodash, gettextCatalog) {
angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
$scope.isCordova = platformInfo.isCordova;
@ -33,7 +33,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
if ($scope.generatingAddress) return;
var wallet = wallet || $scope.wallet;
$scope.error = null;
$scope.addr = null;
$scope.generatingAddress = true;
@ -41,7 +40,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
walletService.getAddress(wallet, forceNew, function(err, addr) {
$scope.generatingAddress = false;
if (err) {
$scope.error = err;
popupService.showAlert(gettextCatalog.getString('Error'), err);
} else {
if (addr)
$scope.addr = addr;