[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: -comment
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: -comment |
Date: |
Wed, 13 Dec 2023 08:28:10 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new dd7cc6f88 -comment
dd7cc6f88 is described below
commit dd7cc6f886122eb5cec8428e2edf28ddb95aa520
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed Dec 13 08:28:06 2023 +0100
-comment
---
packages/taler-util/src/wallet-types.ts | 10 ++++++--
.../src/operations/pay-peer-push-credit.ts | 30 ++++++++++++++++------
2 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/packages/taler-util/src/wallet-types.ts
b/packages/taler-util/src/wallet-types.ts
index 409aa07a6..e9f61680c 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -1088,13 +1088,19 @@ export interface ExchangeDetailedResponse {
export interface WalletCoreVersion {
/**
- * @deprecated
+ * Wallet-core protocol version supported by this implementation
+ * of the API ("server" version).
*/
- hash: string | undefined;
version: string;
exchange: string;
merchant: string;
bank: string;
+
+ /**
+ * @deprecated
+ */
+ hash: string | undefined;
+
/**
* @deprecated will be removed
*/
diff --git a/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts
b/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts
index 575780ba4..1174ccc8e 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts
@@ -193,10 +193,10 @@ export async function preparePeerPushCredit(
undefined,
);
- await ws.db
+ const transitionInfo = await ws.db
.mktx((x) => [x.contractTerms, x.peerPushCredit])
.runReadWrite(async (tx) => {
- await tx.peerPushCredit.add({
+ const rec: PeerPushPaymentIncomingRecord = {
peerPushCreditId,
contractPriv: contractPriv,
exchangeBaseUrl: exchangeBaseUrl,
@@ -210,14 +210,30 @@ export async function preparePeerPushCredit(
estimatedAmountEffective: Amounts.stringify(
wi.withdrawalAmountEffective,
),
- });
-
+ };
+ await tx.peerPushCredit.add(rec);
await tx.contractTerms.put({
h: contractTermsHash,
contractTermsRaw: dec.contractTerms,
});
+
+ const newTxState = computePeerPushCreditTransactionState(rec);
+
+ return {
+ oldTxState: {
+ major: TransactionMajorState.None,
+ },
+ newTxState,
+ } satisfies TransitionInfo;
});
+ const transactionId = constructTransactionIdentifier({
+ tag: TransactionType.PeerPushCredit,
+ peerPushCreditId,
+ });
+
+ notifyTransition(ws, transactionId, transitionInfo);
+
ws.notify({ type: NotificationType.BalanceChange });
return {
@@ -226,10 +242,7 @@ export async function preparePeerPushCredit(
amountRaw: purseStatus.balance,
contractTerms: dec.contractTerms,
peerPushCreditId,
- transactionId: constructTransactionIdentifier({
- tag: TransactionType.PeerPushCredit,
- peerPushCreditId,
- }),
+ transactionId,
exchangeBaseUrl,
};
}
@@ -481,6 +494,7 @@ async function handlePendingMerge(
tx,
withdrawalGroupPrep,
);
+ withdrawalTransition = wgRes.transitionInfo;
peerInc.withdrawalGroupId = wgRes.withdrawalGroup.withdrawalGroupId;
break;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: -comment,
gnunet <=