diff options
author | Florian Dold <florian@dold.me> | 2021-06-22 18:43:11 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-06-22 18:43:11 +0200 |
commit | 09d1dd83ec1bf9ca16841d0afb18b9a7da705bcb (patch) | |
tree | af089d994c233888f3f7291fdc148a44142296ed /packages/taler-wallet-core/src/db.ts | |
parent | 39c4b42dafc5d8fc5f455e7ed936c45ec2340cfc (diff) | |
download | wallet-core-09d1dd83ec1bf9ca16841d0afb18b9a7da705bcb.tar.xz |
prevent conflicting coin allocation with concurrent payments
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 13 |
1 files changed, 13 insertions, 0 deletions
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; |