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-util/src/transactionsTypes.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages/taler-util') diff --git a/packages/taler-util/src/transactionsTypes.ts b/packages/taler-util/src/transactionsTypes.ts index 79c62cbc8..e4b1faf2e 100644 --- a/packages/taler-util/src/transactionsTypes.ts +++ b/packages/taler-util/src/transactionsTypes.ts @@ -187,12 +187,19 @@ export interface TransactionWithdrawal extends TransactionCommon { withdrawalDetails: WithdrawalDetails; } +export interface PeerInfoShort { + expiration: TalerProtocolTimestamp | undefined; + summary: string | undefined; + completed: boolean; +} + /** * Credit because we were paid for a P2P invoice we created. */ export interface TransactionPeerPullCredit extends TransactionCommon { type: TransactionType.PeerPullCredit; + info: PeerInfoShort; /** * Exchange used. */ @@ -220,6 +227,7 @@ export interface TransactionPeerPullCredit extends TransactionCommon { export interface TransactionPeerPullDebit extends TransactionCommon { type: TransactionType.PeerPullDebit; + info: PeerInfoShort; /** * Exchange used. */ @@ -236,6 +244,7 @@ export interface TransactionPeerPullDebit extends TransactionCommon { export interface TransactionPeerPushDebit extends TransactionCommon { type: TransactionType.PeerPushDebit; + info: PeerInfoShort; /** * Exchange used. */ @@ -263,6 +272,7 @@ export interface TransactionPeerPushDebit extends TransactionCommon { export interface TransactionPeerPushCredit extends TransactionCommon { type: TransactionType.PeerPushCredit; + info: PeerInfoShort; /** * Exchange used. */ -- cgit v1.2.3