From 94eeab8ad011d26e447b691a2deaccb91dee1fb7 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 1 Sep 2022 08:41:22 -0300 Subject: more information about p2p: - added the contract terms on WgInfoBankPeerPush and WgInfoBankPeerPull, so we can show summary and expiration in the ui - added info: PeerInfoShort on Transaction* type - definition of completed p2p tx: - push debit: Amounts.cmp(sentAmount, pickedUpAmount) === 0. is this transfer already picked up? (not working) - pull debit: pi.paid, is this invoice already paid? - pull credit: wsr.timestampFinish, has someone already paid my invoice? - push credit: wsr.timestampFinish, have I already picked up this? - changed the txId of peer pull debit to have the incomingId instead of pursePub (allow deletion) --- packages/taler-wallet-core/src/db.ts | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 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 3f97be045..903dfa47d 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -1180,9 +1180,9 @@ export const WALLET_BACKUP_STATE_KEY = "walletBackupState"; */ export type ConfigRecord = | { - key: typeof WALLET_BACKUP_STATE_KEY; - value: WalletBackupConfState; - } + key: typeof WALLET_BACKUP_STATE_KEY; + value: WalletBackupConfState; + } | { key: "currencyDefaultsApplied"; value: boolean }; export interface WalletBackupConfState { @@ -1243,6 +1243,7 @@ export interface WgInfoBankManual { export interface WgInfoBankPeerPull { withdrawalType: WithdrawalRecordType.PeerPullCredit; + contractTerms: any; /** * Needed to quickly construct the taler:// URI for the counterparty * without a join. @@ -1252,6 +1253,8 @@ export interface WgInfoBankPeerPull { export interface WgInfoBankPeerPush { withdrawalType: WithdrawalRecordType.PeerPushCredit; + + contractTerms: any; } export interface WgInfoBankRecoup { @@ -1445,17 +1448,17 @@ export enum BackupProviderStateTag { export type BackupProviderState = | { - tag: BackupProviderStateTag.Provisional; - } + tag: BackupProviderStateTag.Provisional; + } | { - tag: BackupProviderStateTag.Ready; - nextBackupTimestamp: TalerProtocolTimestamp; - } + tag: BackupProviderStateTag.Ready; + nextBackupTimestamp: TalerProtocolTimestamp; + } | { - tag: BackupProviderStateTag.Retrying; - retryInfo: RetryInfo; - lastError?: TalerErrorDetail; - }; + tag: BackupProviderStateTag.Retrying; + retryInfo: RetryInfo; + lastError?: TalerErrorDetail; + }; export interface BackupProviderTerms { supportedProtocolVersion: string; @@ -1630,6 +1633,7 @@ export interface PeerPushPaymentInitiationRecord { amount: AmountString; + contractTerms: any; /** * Purse public key. Used as the primary key to look * up this record. -- cgit v1.2.3