Fix : Check if the status could be set before checking the balance.
This commit is contained in:
parent
5cb3d7521d
commit
a8e5c212f0
1 changed files with 1 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi
|
||||||
walletsBtc = profileService.getWallets({coin: 'btc'});
|
walletsBtc = profileService.getWallets({coin: 'btc'});
|
||||||
walletsBch = profileService.getWallets({coin: 'bch'});
|
walletsBch = profileService.getWallets({coin: 'bch'});
|
||||||
$scope.fromWallets = lodash.filter(walletsBtc.concat(walletsBch), function(w) {
|
$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;
|
$scope.singleFromWallet = $scope.fromWallets.length === 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue