wallet-core: allow zero amounts in payments again
This commit is contained in:
parent
e87073d42a
commit
1fceb13517
@ -115,6 +115,12 @@ export async function spendCoins(
|
||||
}>,
|
||||
csi: CoinsSpendInfo,
|
||||
): Promise<void> {
|
||||
if (csi.coinPubs.length != csi.contributions.length) {
|
||||
throw Error("assertion failed");
|
||||
}
|
||||
if (csi.coinPubs.length === 0) {
|
||||
return;
|
||||
}
|
||||
let refreshCoinPubs: CoinRefreshRequest[] = [];
|
||||
for (let i = 0; i < csi.coinPubs.length; i++) {
|
||||
const coin = await tx.coins.get(csi.coinPubs[i]);
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
import {
|
||||
AbsoluteTime,
|
||||
ExtendedStatus,
|
||||
PaymentStatus,
|
||||
TalerProtocolTimestamp,
|
||||
TransactionCommon,
|
||||
@ -60,6 +61,7 @@ export default {
|
||||
const commonTransaction = {
|
||||
amountRaw: "KUDOS:11",
|
||||
amountEffective: "KUDOS:9.2",
|
||||
extendedStatus: ExtendedStatus.Done,
|
||||
pending: false,
|
||||
timestamp: TalerProtocolTimestamp.now(),
|
||||
transactionId: "txn:deposit:12",
|
||||
|
Loading…
Reference in New Issue
Block a user