[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: allow zero amoun
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: allow zero amounts in payments again |
Date: |
Thu, 12 Jan 2023 11:22:46 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 1fceb1351 wallet-core: allow zero amounts in payments again
1fceb1351 is described below
commit 1fceb13517106a65c3fb1d7398303e5da0dab77d
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu Jan 12 11:22:37 2023 +0100
wallet-core: allow zero amounts in payments again
---
packages/taler-wallet-core/src/operations/common.ts | 6 ++++++
.../taler-wallet-webextension/src/wallet/Transaction.stories.tsx | 2 ++
2 files changed, 8 insertions(+)
diff --git a/packages/taler-wallet-core/src/operations/common.ts
b/packages/taler-wallet-core/src/operations/common.ts
index 96009eb0b..31c1bebb2 100644
--- a/packages/taler-wallet-core/src/operations/common.ts
+++ b/packages/taler-wallet-core/src/operations/common.ts
@@ -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]);
diff --git
a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
index f2ebb3919..fea96a02c 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
@@ -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",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: wallet-core: allow zero amounts in payments again,
gnunet <=