diff options
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index 7ba0fadc6..3f97be045 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -1224,6 +1224,7 @@ export const enum WithdrawalRecordType { BankIntegrated = "bank-integrated", PeerPullCredit = "peer-pull-credit", PeerPushCredit = "peer-push-credit", + Recoup = "recoup", } export interface WgInfoBankIntegrated { @@ -1253,11 +1254,16 @@ export interface WgInfoBankPeerPush { withdrawalType: WithdrawalRecordType.PeerPushCredit; } +export interface WgInfoBankRecoup { + withdrawalType: WithdrawalRecordType.Recoup; +} + export type WgInfo = | WgInfoBankIntegrated | WgInfoBankManual | WgInfoBankPeerPull - | WgInfoBankPeerPush; + | WgInfoBankPeerPush + | WgInfoBankRecoup; /** * Group of withdrawal operations that need to be executed. @@ -1287,6 +1293,8 @@ export interface WithdrawalGroupRecord { /** * The reserve private key. + * + * FIXME: Already in the reserves object store, redundant! */ reservePriv: string; @@ -1355,9 +1363,9 @@ export interface WithdrawalGroupRecord { denomSelUid: string; /** - * Retry info, always present even on completed operations so that indexing works. + * Retry info. */ - retryInfo: RetryInfo; + retryInfo?: RetryInfo; lastError: TalerErrorDetail | undefined; } @@ -1386,6 +1394,8 @@ export interface RecoupGroupRecord { */ recoupGroupId: string; + exchangeBaseUrl: string; + timestampStarted: TalerProtocolTimestamp; timestampFinished: TalerProtocolTimestamp | undefined; @@ -1724,6 +1734,13 @@ export interface PeerPullPaymentIncomingRecord { contractPriv: string; } +// FIXME: give this some smaller "row ID" to +// reference in other records? +export interface ReserveRecord { + reservePub: string; + reservePriv: string; +} + export const WalletStoresV1 = { coins: describeStore( describeContents<CoinRecord>("coins", { @@ -1735,6 +1752,12 @@ export const WalletStoresV1 = { byCoinEvHash: describeIndex("byCoinEvHash", "coinEvHash"), }, ), + reserves: describeStore( + describeContents<ReserveRecord>("reserves", { + keyPath: "reservePub", + }), + {}, + ), config: describeStore( describeContents<ConfigRecord>("config", { keyPath: "key" }), {}, |