Fix receive-tab for wallets not backed up

This commit is contained in:
Gustavo Maximiliano Cortez 2016-11-14 17:51:15 -03:00
commit 30240d30cd
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
2 changed files with 9 additions and 10 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError) {
var listeners = [];
$scope.isCordova = platformInfo.isCordova;
@ -20,7 +20,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.generatingAddress = true;
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
$scope.generatingAddress = false;
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
if (err) popupService.showAlert(gettextCatalog.getString('Error'), bwcError.msg(err));
$scope.addr = addr;
if ($scope.walletAddrs[$scope.wallet.id]) $scope.walletAddrs[$scope.wallet.id] = addr;
$timeout(function() {