From 09d1dd83ec1bf9ca16841d0afb18b9a7da705bcb Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 22 Jun 2021 18:43:11 +0200 Subject: prevent conflicting coin allocation with concurrent payments --- packages/taler-wallet-core/src/db.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'packages/taler-wallet-core/src/db.ts') diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index 2d2c0615c..36b4e0864 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -848,6 +848,17 @@ export interface CoinRecord { * Status of the coin. */ status: CoinStatus; + + /** + * Information about what the coin has been allocated for. + * Used to prevent allocation of the same coin for two different payments. + */ + allocation?: CoinAllocation; +} + +export interface CoinAllocation { + id: string; + amount: AmountString; } export enum ProposalStatus { @@ -1643,6 +1654,8 @@ export interface DepositGroupRecord { payCoinSelection: PayCoinSelection; + payCoinSelectionUid: string; + totalPayCost: AmountJson; effectiveDepositAmount: AmountJson; -- cgit v1.2.3