From a8e5c212f08abc13cff85b5484166714ba5773f2 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 21 Sep 2018 11:41:20 +0200 Subject: [PATCH] Fix : Check if the status could be set before checking the balance. --- src/js/controllers/shapeshift.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/controllers/shapeshift.js b/src/js/controllers/shapeshift.js index 0dac21a11..652f54c34 100644 --- a/src/js/controllers/shapeshift.js +++ b/src/js/controllers/shapeshift.js @@ -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;