Added some additional validation checks on wallet status.
This commit is contained in:
parent
9e7566b171
commit
d2d1511e61
1 changed files with 2 additions and 2 deletions
|
|
@ -671,7 +671,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
|||
};
|
||||
|
||||
function updateAvailableFundsFromWallet(wallet) {
|
||||
if (wallet.status) {
|
||||
if (wallet.status && wallet.status.isValid) {
|
||||
availableFundsInCrypto = wallet.status.spendableBalanceStr;
|
||||
availableSatoshis = wallet.status.spendableAmount;
|
||||
if (wallet.status.alternativeBalanceAvailable) {
|
||||
|
|
@ -680,7 +680,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
|||
availableFundsInFiat = '';
|
||||
}
|
||||
|
||||
} else if (wallet.cachedStatus) {
|
||||
} else if (wallet.cachedStatus && wallet.status.isValid) {
|
||||
|
||||
if (wallet.cachedStatus.alternativeBalanceAvailable) {
|
||||
availableFundsInFiat = wallet.cachedStatus.spendableBalanceAlternative + ' ' + wallet.cachedStatus.alternativeIsoCode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue