gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: -formatting


From: gnunet
Subject: [taler-wallet-core] branch master updated: -formatting
Date: Thu, 19 May 2022 11:01:10 +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 25af1987 -formatting
25af1987 is described below

commit 25af1987b26000de0f8272678675978b27d14775
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu May 19 11:01:07 2022 +0200

    -formatting
---
 packages/taler-wallet-core/src/operations/pay.ts | 10 ++++------
 packages/taler-wallet-core/src/util/retries.ts   |  4 ++--
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/pay.ts 
b/packages/taler-wallet-core/src/operations/pay.ts
index e8604d3f..f22d51a9 100644
--- a/packages/taler-wallet-core/src/operations/pay.ts
+++ b/packages/taler-wallet-core/src/operations/pay.ts
@@ -95,9 +95,7 @@ import {
   throwUnexpectedRequestError,
 } from "../util/http.js";
 import { GetReadWriteAccess } from "../util/query.js";
-import {
-  RetryInfo,
-} from "../util/retries.js";
+import { RetryInfo } from "../util/retries.js";
 import { getExchangeDetails } from "./exchanges.js";
 import { createRefreshGroup, getTotalRefreshCost } from "./refresh.js";
 import { guardOperationException } from "./common.js";
@@ -606,9 +604,9 @@ async function failProposalPermanently(
 
 function getProposalRequestTimeout(proposal: ProposalRecord): Duration {
   return Duration.clamp({
-    lower: Duration.fromSpec({ seconds: 1}),
-    upper: Duration.fromSpec({seconds: 60}),
-    value: getRetryDuration(proposal.retryInfo),
+    lower: Duration.fromSpec({ seconds: 1 }),
+    upper: Duration.fromSpec({ seconds: 60 }),
+    value: RetryInfo.getDuration(proposal.retryInfo),
   });
 }
 
diff --git a/packages/taler-wallet-core/src/util/retries.ts 
b/packages/taler-wallet-core/src/util/retries.ts
index 965ba033..2697ca4a 100644
--- a/packages/taler-wallet-core/src/util/retries.ts
+++ b/packages/taler-wallet-core/src/util/retries.ts
@@ -66,7 +66,6 @@ function updateTimeout(
 }
 
 export namespace RetryInfo {
-
   export function getDuration(
     r: RetryInfo | undefined,
     p: RetryPolicy = defaultRetryPolicy,
@@ -80,7 +79,8 @@ export namespace RetryInfo {
     }
     const t = p.backoffDelta.d_ms * Math.pow(p.backoffBase, r.retryCounter);
     return {
-      d_ms: p.maxTimeout.d_ms === "forever" ? t : Math.min(p.maxTimeout.d_ms, 
t),
+      d_ms:
+        p.maxTimeout.d_ms === "forever" ? t : Math.min(p.maxTimeout.d_ms, t),
     };
   }
 

-- 
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]