Merge pull request #1739 from isocolsky/balance
showing N/A when rate services not available
This commit is contained in:
commit
a73edca586
4 changed files with 12 additions and 8 deletions
|
|
@ -278,15 +278,18 @@ angular.module('copayApp.services')
|
|||
}
|
||||
r.balanceByAddr = balanceByAddr;
|
||||
root.updateAddressList();
|
||||
r.updatingBalance = false;
|
||||
|
||||
rateService.whenAvailable(function() {
|
||||
if (rateService.isAvailable()) {
|
||||
r.totalBalanceAlternative = rateService.toFiat(balanceSat, w.settings.alternativeIsoCode);
|
||||
r.alternativeIsoCode = w.settings.alternativeIsoCode;
|
||||
r.lockedBalanceAlternative = rateService.toFiat(balanceSat - safeBalanceSat, w.settings.alternativeIsoCode);
|
||||
r.alternativeConversionRate = rateService.toFiat(100000000, w.settings.alternativeIsoCode);
|
||||
return cb(null, r)
|
||||
});
|
||||
r.alternativeBalanceAvailable = true;
|
||||
};
|
||||
|
||||
r.updatingBalance = false;
|
||||
|
||||
return cb(null, r)
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue