summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-06-22 14:55:54 +0200
committerFlorian Dold <florian@dold.me>2021-06-22 14:55:54 +0200
commitc51b372abeba8cab9500d6cc7198ba38bee30737 (patch)
treece0d9ee1616061dd4c2f9864c7ed31d7df1fb701
parente35c2f581b49f6441b6f75bb9ce0a1677d5fb46f (diff)
downloadwallet-core-c51b372abeba8cab9500d6cc7198ba38bee30737.tar.gz
wallet-core-c51b372abeba8cab9500d6cc7198ba38bee30737.tar.bz2
wallet-core-c51b372abeba8cab9500d6cc7198ba38bee30737.zip
comment
-rw-r--r--packages/taler-wallet-core/src/operations/pay.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts
index e662ee72f..71f11c960 100644
--- a/packages/taler-wallet-core/src/operations/pay.ts
+++ b/packages/taler-wallet-core/src/operations/pay.ts
@@ -368,6 +368,15 @@ export async function getCandidatePayCoins(
};
}
+/**
+ * Apply a coin selection to the database. Marks coins as spent
+ * and creates a refresh session for the remaining amount.
+ *
+ * FIXME: This does not deal well with conflicting spends!
+ * When two payments are made in parallel, the same coin can be selected
+ * for two payments.
+ * However, this is a situation that can also happen via sync.
+ */
export async function applyCoinSpend(
ws: InternalWalletState,
tx: GetReadWriteAccess<{