aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/db.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-09-01 08:41:22 -0300
committerSebastian <sebasjm@gmail.com>2022-09-01 08:42:45 -0300
commit94eeab8ad011d26e447b691a2deaccb91dee1fb7 (patch)
tree7912de7228bb136fe9d3ff6eb4e20208e0896645 /packages/taler-wallet-core/src/db.ts
parente759684fd0658b4a3ba241744424ceda11bd500b (diff)
downloadwallet-core-94eeab8ad011d26e447b691a2deaccb91dee1fb7.tar.xz
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)
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r--packages/taler-wallet-core/src/db.ts28
1 files changed, 16 insertions, 12 deletions
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.