fix(walletService): handle cache.pendingAmount === null properly
This commit is contained in:
parent
703256d92f
commit
a4ee470a3c
1 changed files with 2 additions and 2 deletions
|
|
@ -220,9 +220,9 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
cache.totalBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat) + ' ' + cache.unitName;
|
cache.totalBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat) + ' ' + cache.unitName;
|
||||||
cache.lockedBalanceStr = txFormatService.formatAmount(cache.lockedBalanceSat) + ' ' + cache.unitName;
|
cache.lockedBalanceStr = txFormatService.formatAmount(cache.lockedBalanceSat) + ' ' + cache.unitName;
|
||||||
cache.availableBalanceStr = txFormatService.formatAmount(cache.availableBalanceSat) + ' ' + 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;
|
cache.pendingAmountStr = txFormatService.formatAmount(cache.pendingAmount) + ' ' + cache.unitName;
|
||||||
} else {
|
} else {
|
||||||
cache.pendingAmountStr = null;
|
cache.pendingAmountStr = null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue