From a11ac57535b0375f152ce115ee541cb8aca98e84 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 24 Aug 2022 22:17:19 +0200 Subject: wallet-core: p2p support for transactions list --- packages/taler-wallet-core/src/db.ts | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (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 3d59ce0a7..e6b4854db 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -1219,6 +1219,13 @@ export interface DenomSelectionState { }[]; } +export const enum WithdrawalRecordType { + BankManual = "bank-manual", + BankIntegrated = "bank-integrated", + PeerPullCredit = "peer-pull-credit", + PeerPushCredit = "peer-push-credit", +} + /** * Group of withdrawal operations that need to be executed. * (Either for a normal withdrawal or from a tip.) @@ -1232,6 +1239,8 @@ export interface WithdrawalGroupRecord { */ withdrawalGroupId: string; + withdrawalType: WithdrawalRecordType; + /** * Secret seed used to derive planchets. * Stored since planchets are created lazily. @@ -1607,8 +1616,6 @@ export interface PeerPushPaymentInitiationRecord { contractPriv: string; - contractPub: string; - purseExpiration: TalerProtocolTimestamp; /** @@ -1681,7 +1688,11 @@ export interface PeerPullPaymentIncomingRecord { contractTerms: PeerContractTerms; - timestamp: TalerProtocolTimestamp; + timestampCreated: TalerProtocolTimestamp; + + paid: boolean; + + accepted: boolean; contractPriv: string; } @@ -1878,9 +1889,18 @@ export const WalletStoresV1 = { ]), }, ), - peerPullPaymentInitiation: describeStore( + peerPullPaymentInitiations: describeStore( describeContents( - "peerPushPaymentInitiation", + "peerPullPaymentInitiations", + { + keyPath: "pursePub", + }, + ), + {}, + ), + peerPushPaymentInitiations: describeStore( + describeContents( + "peerPushPaymentInitiations", { keyPath: "pursePub", }, -- cgit v1.2.3