gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated (d317321a -> 05838080)


From: gnunet
Subject: [taler-wallet-core] branch master updated (d317321a -> 05838080)
Date: Thu, 17 Mar 2022 11:09:10 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a change to branch master
in repository wallet-core.

    from d317321a bump version
     add 151aa904 cache breaker
     new 05838080 wallet: round timestamps in db-less requests to the exchange

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 packages/taler-util/src/time.ts            | 1 +
 packages/taler-wallet-core/src/dbless.ts   | 9 +++++----
 packages/taler-wallet-core/src/versions.ts | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/packages/taler-util/src/time.ts b/packages/taler-util/src/time.ts
index 3b80b4ee..9f957101 100644
--- a/packages/taler-util/src/time.ts
+++ b/packages/taler-util/src/time.ts
@@ -87,6 +87,7 @@ export namespace Timestamp {
   export const now = getTimestampNow;
   export const min = timestampMin;
   export const isExpired = isTimestampExpired;
+  export const truncateToSecond = timestampTruncateToSecond;
 }
 
 export function timestampMin(t1: Timestamp, t2: Timestamp): Timestamp {
diff --git a/packages/taler-wallet-core/src/dbless.ts 
b/packages/taler-wallet-core/src/dbless.ts
index 85a72e28..169b6ae0 100644
--- a/packages/taler-wallet-core/src/dbless.ts
+++ b/packages/taler-wallet-core/src/dbless.ts
@@ -41,10 +41,10 @@ import {
   ExchangeProtocolVersion,
   ExchangeWithdrawRequest,
   getRandomBytes,
-  getTimestampNow,
   hashWire,
   Logger,
   parsePaytoUri,
+  Timestamp,
   UnblindedSignature,
 } from "@gnu-taler/taler-util";
 import { DenominationRecord } from "./db.js";
@@ -223,8 +223,9 @@ export async function depositCoin(args: {
     args.depositPayto ?? "payto://x-taler-bank/localhost/foo";
   const wireSalt = encodeCrock(getRandomBytes(16));
   const contractTermsHash = encodeCrock(getRandomBytes(64));
-  const depositTimestamp = getTimestampNow();
-  const refundDeadline = getTimestampNow();
+  const depositTimestamp = Timestamp.truncateToSecond(Timestamp.now());
+  const refundDeadline = Timestamp.truncateToSecond(Timestamp.now());
+  const wireTransferDeadline = Timestamp.truncateToSecond(Timestamp.now());
   const merchantPub = encodeCrock(getRandomBytes(32));
   const dp = await cryptoApi.signDepositPermission({
     coinPriv: coin.coinPriv,
@@ -248,7 +249,7 @@ export async function depositCoin(args: {
     h_contract_terms: contractTermsHash,
     ub_sig: coin.denomSig,
     timestamp: depositTimestamp,
-    wire_transfer_deadline: getTimestampNow(),
+    wire_transfer_deadline: wireTransferDeadline,
     refund_deadline: refundDeadline,
     coin_sig: dp.coin_sig,
     denom_pub_hash: dp.h_denom,
diff --git a/packages/taler-wallet-core/src/versions.ts 
b/packages/taler-wallet-core/src/versions.ts
index 23445b25..f05d884b 100644
--- a/packages/taler-wallet-core/src/versions.ts
+++ b/packages/taler-wallet-core/src/versions.ts
@@ -42,4 +42,4 @@ export const WALLET_BANK_INTEGRATION_PROTOCOL_VERSION = 
"0:0:0";
  *
  * This is only a temporary measure.
  */
-export const WALLET_CACHE_BREAKER_CLIENT_VERSION = "4";
+export const WALLET_CACHE_BREAKER_CLIENT_VERSION = "5";

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]