[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: work around miss
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: work around missing timestamp in legacy transaction |
Date: |
Thu, 13 Apr 2023 15:58:40 +0200 |
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 b567ba466 wallet-core: work around missing timestamp in legacy
transaction
b567ba466 is described below
commit b567ba4668a5ac034e7227f53b5290195303980c
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu Apr 13 15:58:38 2023 +0200
wallet-core: work around missing timestamp in legacy transaction
---
packages/taler-harness/src/index.ts | 1 +
packages/taler-wallet-cli/src/index.ts | 11 +++++++++++
packages/taler-wallet-core/src/operations/transactions.ts | 9 +++++++--
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/packages/taler-harness/src/index.ts
b/packages/taler-harness/src/index.ts
index ada573698..59fa80411 100644
--- a/packages/taler-harness/src/index.ts
+++ b/packages/taler-harness/src/index.ts
@@ -162,6 +162,7 @@ advancedCli
await runTestWithState(testState, runEnv1, "env1", true);
});
+
const sandcastleCli = testingCli.subcommand("sandcastleArgs", "sandcastle", {
help: "Subcommands for handling GNU Taler sandcastle deployments.",
});
diff --git a/packages/taler-wallet-cli/src/index.ts
b/packages/taler-wallet-cli/src/index.ts
index e4e43808c..fc67d55cd 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -38,6 +38,7 @@ import {
setGlobalLogLevelFromString,
summarizeTalerErrorDetail,
TalerUriType,
+ Transaction,
WalletNotification,
} from "@gnu-taler/taler-util";
import { clk } from "@gnu-taler/taler-util/clk";
@@ -1128,6 +1129,16 @@ const advancedCli = walletCli.subcommand("advancedArgs",
"advanced", {
help: "Subcommands for advanced operations (only use if you know what you're
doing!).",
});
+advancedCli
+ .subcommand("sampleTransactions", "sample-transactions", {
+ help: "Print sample wallet-core transactions",
+ })
+ .action(async (args) => {
+ let transactions: Transaction[] = [
+
+ ];
+ });
+
advancedCli
.subcommand("serve", "serve", {
help: "Serve the wallet API via a unix domain socket.",
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts
b/packages/taler-wallet-core/src/operations/transactions.ts
index 02c726449..3ace5bf71 100644
--- a/packages/taler-wallet-core/src/operations/transactions.ts
+++ b/packages/taler-wallet-core/src/operations/transactions.ts
@@ -525,7 +525,8 @@ function buildTransactionForPeerPullCredit(
? ExtendedStatus.Done
: ExtendedStatus.Pending,
pending: !wsr.timestampFinish,
- timestamp: pullCredit.mergeTimestamp,
+ // Old transactions don't have it!
+ timestamp: pullCredit.mergeTimestamp ?? TalerProtocolTimestamp.now(),
info: {
expiration: wsr.wgInfo.contractTerms.purse_expiration,
summary: wsr.wgInfo.contractTerms.summary,
@@ -558,7 +559,8 @@ function buildTransactionForPeerPullCredit(
exchangeBaseUrl: pullCredit.exchangeBaseUrl,
extendedStatus: ExtendedStatus.Pending,
pending: true,
- timestamp: pullCredit.mergeTimestamp,
+ // Old transactions don't have it!
+ timestamp: pullCredit.mergeTimestamp ?? TalerProtocolTimestamp.now(),
info: {
expiration: peerContractTerms.purse_expiration,
summary: peerContractTerms.summary,
@@ -1387,6 +1389,9 @@ export async function getTransactions(
if (!tx.amountRaw) {
logger.warn(`missing amountRaw in ${j2s(tx)}`);
}
+ if (!tx.timestamp) {
+ logger.warn(`missing timestamp in ${j2s(tx)}`);
+ }
}
const txPending = transactions.filter((x) => x.pending);
--
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: wallet-core: work around missing timestamp in legacy transaction,
gnunet <=