Merge pull request #415 from bitpay/revert-405-fix/sendTip

Revert "fix send tip"
This commit is contained in:
Gustavo Maximiliano Cortez 2016-10-12 15:52:26 -03:00 committed by GitHub
commit de7404eef1

View file

@ -106,7 +106,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
var updateHasFunds = function() {
$scope.hasFunds = true;
$scope.hasFunds = null;
var wallets = profileService.getWallets({
onlyComplete: true,
@ -114,9 +114,6 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
if (!wallets || !wallets.length) {
$scope.hasFunds = false;
$timeout(function() {
$scope.$apply();
});
}
var index = 0;
@ -127,16 +124,13 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
$log.error(err);
return;
}
if (status.availableBalanceSat && status.availableBalanceSat > 0) {
if (status.availableBalanceSat) {
$scope.hasFunds = true;
}
else $scope.hasFunds = false;
if (index == wallets.length) {
$scope.hasFunds = $scope.hasFunds || false;
}
$timeout(function() {
$scope.$apply();
})
});
});
};