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);