From 2ef44c146ac4e8831ba8f6a74e3341f4487203d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Wed, 12 Oct 2016 12:09:09 -0300 Subject: [PATCH] fix send tip --- src/js/controllers/tab-send.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 9636fa305..8c74feb78 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -106,7 +106,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function( var updateHasFunds = function() { - $scope.hasFunds = null; + $scope.hasFunds = true; var wallets = profileService.getWallets({ onlyComplete: true, @@ -114,6 +114,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function( if (!wallets || !wallets.length) { $scope.hasFunds = false; + $timeout(function() { + $scope.$apply(); + }); } var index = 0; @@ -124,13 +127,16 @@ angular.module('copayApp.controllers').controller('tabSendController', function( $log.error(err); return; } - - if (status.availableBalanceSat) { + if (status.availableBalanceSat && status.availableBalanceSat > 0) { $scope.hasFunds = true; } + else $scope.hasFunds = false; if (index == wallets.length) { $scope.hasFunds = $scope.hasFunds || false; } + $timeout(function() { + $scope.$apply(); + }) }); }); };