fix(walletService): cache.pendingAmount can be 0

This commit is contained in:
Jason Dreyzehner 2016-10-31 15:43:37 -04:00
commit d64cd5413b

View file

@ -222,7 +222,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
cache.availableBalanceStr = txFormatService.formatAmount(cache.availableBalanceSat) + ' ' + cache.unitName;
cache.pendingBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat + (cache.pendingAmount === null? 0 : cache.pendingAmount)) + ' ' + cache.unitName;
if (cache.pendingAmount !== null) {
if (cache.pendingAmount !== null && cache.pendingAmount !== 0) {
cache.pendingAmountStr = txFormatService.formatAmount(cache.pendingAmount) + ' ' + cache.unitName;
} else {
cache.pendingAmountStr = null;