diff --git a/src/js/services/walletService.js b/src/js/services/walletService.js index e53a3b1d0..8ea473cf5 100644 --- a/src/js/services/walletService.js +++ b/src/js/services/walletService.js @@ -220,9 +220,9 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim cache.totalBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat) + ' ' + cache.unitName; cache.lockedBalanceStr = txFormatService.formatAmount(cache.lockedBalanceSat) + ' ' + cache.unitName; cache.availableBalanceStr = txFormatService.formatAmount(cache.availableBalanceSat) + ' ' + cache.unitName; - cache.pendingBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat + cache.pendingAmount) + ' ' + cache.unitName; + cache.pendingBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat + (cache.pendingAmount === null? 0 : cache.pendingAmount)) + ' ' + cache.unitName; - if (cache.pendingAmount) { + if (cache.pendingAmount !== null) { cache.pendingAmountStr = txFormatService.formatAmount(cache.pendingAmount) + ' ' + cache.unitName; } else { cache.pendingAmountStr = null;