From d5a933e4cb685aab3e5e6bae5ca2358291e59130 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 8 Mar 2022 20:39:52 +0100 Subject: wallet-core: handle reserve retries better We now always increment the next retry timeout before doing anything else, so that it is impossible to accidentally retry immediately. This fixes a bug where we previously made many, very frequent requests to the bank integration API. --- packages/taler-util/src/time.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/taler-util/src') diff --git a/packages/taler-util/src/time.ts b/packages/taler-util/src/time.ts index b941cf46c..5fef0bf47 100644 --- a/packages/taler-util/src/time.ts +++ b/packages/taler-util/src/time.ts @@ -23,7 +23,7 @@ */ import { Codec, renderContext, Context } from "./codec.js"; -export class Timestamp { +export interface Timestamp { /** * Timestamp in milliseconds. */ @@ -81,7 +81,9 @@ export namespace Duration { } export namespace Timestamp { + export const now = getTimestampNow; export const min = timestampMin; + export const isExpired = isTimestampExpired; } export function timestampMin(t1: Timestamp, t2: Timestamp): Timestamp { -- cgit v1.2.3