summaryrefslogtreecommitdiff
path: root/packages/taler-util
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-util
parente759684fd0658b4a3ba241744424ceda11bd500b (diff)
downloadwallet-core-94eeab8ad011d26e447b691a2deaccb91dee1fb7.tar.gz
wallet-core-94eeab8ad011d26e447b691a2deaccb91dee1fb7.tar.bz2
wallet-core-94eeab8ad011d26e447b691a2deaccb91dee1fb7.zip
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-util')
-rw-r--r--packages/taler-util/src/transactionsTypes.ts10
1 files changed, 10 insertions, 0 deletions
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.
*/