Fix : Check if the status could be set before checking the balance.

This commit is contained in:
Jean-Baptiste Dominguez 2018-09-21 11:41:20 +02:00
commit a8e5c212f0

View file

@ -10,7 +10,7 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi
walletsBtc = profileService.getWallets({coin: 'btc'});
walletsBch = profileService.getWallets({coin: 'bch'});
$scope.fromWallets = lodash.filter(walletsBtc.concat(walletsBch), function(w) {
return w.status.balance.availableAmount > 0;
return (w.status && w.status.balance && w.status.balance.availableAmount > 0);
});
$scope.singleFromWallet = $scope.fromWallets.length === 1;