check balance refactor
This commit is contained in:
parent
241747f98f
commit
faafef9950
1 changed files with 3 additions and 6 deletions
|
|
@ -133,13 +133,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
||||||
lodash.each(wallets, function(w) {
|
lodash.each(wallets, function(w) {
|
||||||
walletService.getStatus(w, {}, function(err, status) {
|
walletService.getStatus(w, {}, function(err, status) {
|
||||||
++index;
|
++index;
|
||||||
if (index == wallets.length) $scope.checkingBalance = false;
|
if (err && !status) {
|
||||||
if (err || !status) {
|
|
||||||
$log.error(err);
|
$log.error(err);
|
||||||
return;
|
} else if (status.availableBalanceSat > 0) {
|
||||||
}
|
|
||||||
|
|
||||||
if (status.availableBalanceSat > 0) {
|
|
||||||
$scope.hasFunds = true;
|
$scope.hasFunds = true;
|
||||||
$rootScope.everHasFunds = true;
|
$rootScope.everHasFunds = true;
|
||||||
}
|
}
|
||||||
|
|
@ -148,6 +144,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
||||||
if ($scope.hasFunds != true) {
|
if ($scope.hasFunds != true) {
|
||||||
$ionicScrollDelegate.freezeScroll(true);
|
$ionicScrollDelegate.freezeScroll(true);
|
||||||
}
|
}
|
||||||
|
$scope.checkingBalance = false;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue