Add the received wallet status to the wallet API object

This commit is contained in:
Sebastiaan Pasma 2018-09-12 16:50:26 +02:00
commit 908dcbf968
No known key found for this signature in database
GPG key ID: 9A2B0C8B95A1D26F

View file

@ -123,6 +123,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu
walletsAll.forEach(function forWallet(wallet) { walletsAll.forEach(function forWallet(wallet) {
if (!wallet.status) { if (!wallet.status) {
walletService.getStatus(wallet, {}, function(err, status) { walletService.getStatus(wallet, {}, function(err, status) {
wallet.status = status;
if (status.availableBalanceSat > ($scope.params.amount ? $scope.params.amount : 0)) { if (status.availableBalanceSat > ($scope.params.amount ? $scope.params.amount : 0)) {
walletsSufficientFunds.push(wallet); walletsSufficientFunds.push(wallet);
} else { } else {