diff options
Diffstat (limited to 'packages/taler-wallet-core/src')
| -rw-r--r-- | packages/taler-wallet-core/src/db.ts | 14 | ||||
| -rw-r--r-- | packages/taler-wallet-core/src/operations/withdraw.ts | 5 |
2 files changed, 18 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index a642c0203..b52a503bc 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -688,6 +688,7 @@ export interface PlanchetRecord { */ coinIdx: number; + planchetStatus: PlanchetStatus; lastError: TalerErrorDetail | undefined; @@ -702,6 +703,12 @@ export interface PlanchetRecord { coinEvHash: string; + /** + * Index into the kappa-many planchet commitments per coin + * for the age-withdraw operation. + */ + ageWithdrawIdx?: number; + ageCommitmentProof?: AgeCommitmentProof; } @@ -1454,7 +1461,7 @@ export interface KycPendingInfo { } /** * Group of withdrawal operations that need to be executed. - * (Either for a normal withdrawal or from a reward.) + * (Either for a normal {single-|batch-|age-} withdrawal or from a reward.) * * The withdrawal group record is only created after we know * the coin selection we want to withdraw. @@ -2544,6 +2551,11 @@ export const WalletStoresV1 = { "planchets", describeContents<PlanchetRecord>({ keyPath: "coinPub" }), { + byGroupAgeCoin: describeIndex("byGroupAgeCoin", [ + "withdrawalGroupId", + "ageWithdrawIdx", + "coinIdx", + ]), byGroupAndIndex: describeIndex("byGroupAndIndex", [ "withdrawalGroupId", "coinIdx", diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index d8ce0a9a2..a3d95fb5c 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -62,6 +62,10 @@ import { ExchangeWithdrawResponse, WithdrawUriInfoResponse, ExchangeBatchWithdrawRequest, + ExchangeAgeWithdrawRequest, + ExchangeAgeWithdrawRevealRequest, + ExchangeAgeWithdrawResponse, + ExchangeAgeWithdrawRevealResponse, TransactionState, TransactionMajorState, TransactionMinorState, @@ -857,6 +861,7 @@ async function processPlanchetExchangeBatchRequest( coinIdx < wgContext.numPlanchets; coinIdx++ ) { + // FIXME[oec]: Add lookup of planchet for age-withdraw here let planchet = await tx.planchets.indexes.byGroupAndIndex.get([ withdrawalGroup.withdrawalGroupId, coinIdx, |
