tolerate zero-value payments

This commit is contained in:
Florian Dold 2021-07-12 15:55:31 +02:00
parent 2667d741e9
commit 1c0cce3f58
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -145,7 +145,8 @@ export async function getTotalPaymentCost(
costs.push(pcs.coinContributions[i]); costs.push(pcs.coinContributions[i]);
costs.push(refreshCost); costs.push(refreshCost);
} }
return Amounts.sum(costs).amount; const zero = Amounts.getZero(pcs.paymentAmount.currency);
return Amounts.sum([zero, ...costs]).amount;
}); });
} }