diff options
author | Florian Dold <florian@dold.me> | 2022-08-24 22:17:19 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-08-24 22:17:19 +0200 |
commit | a11ac57535b0375f152ce115ee541cb8aca98e84 (patch) | |
tree | 95294389598f6d15c0de389a8e5024dc17592b15 /packages/taler-wallet-core/src/db.ts | |
parent | bf516a77e8d38e81ee9816d6ee0ab29bcb878e84 (diff) | |
download | wallet-core-a11ac57535b0375f152ce115ee541cb8aca98e84.tar.xz |
wallet-core: p2p support for transactions list
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 30 |
1 files changed, 25 insertions, 5 deletions
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<PeerPullPaymentInitiationRecord>( - "peerPushPaymentInitiation", + "peerPullPaymentInitiations", + { + keyPath: "pursePub", + }, + ), + {}, + ), + peerPushPaymentInitiations: describeStore( + describeContents<PeerPushPaymentInitiationRecord>( + "peerPushPaymentInitiations", { keyPath: "pursePub", }, |