gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: -work around multiple availab


From: gnunet
Subject: [taler-wallet-core] branch master updated: -work around multiple available languages
Date: Tue, 12 Dec 2023 16:47:30 +0100

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 b448b77eb -work around multiple available languages
b448b77eb is described below

commit b448b77eb4e8dc0157d1780e11bc0f38d7b636cf
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Dec 12 16:47:26 2023 +0100

    -work around multiple available languages
---
 packages/taler-wallet-core/src/operations/exchanges.ts | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts 
b/packages/taler-wallet-core/src/operations/exchanges.ts
index 88127b71f..69f708364 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -152,7 +152,11 @@ async function downloadExchangeWithTermsOfService(
   const tosContentLanguage = resp.headers.get("content-language") || undefined;
   const tosContentType = resp.headers.get("content-type") || "text/plain";
   const availLangStr = resp.headers.get("avail-languages") || "";
-  const tosAvailableLanguages = availLangStr.split(",").map((x) => x.trim());
+  // Work around exchange bug that reports the same language multiple times.
+  const availLangSet = new Set<string>(
+    availLangStr.split(",").map((x) => x.trim()),
+  );
+  const tosAvailableLanguages = [...availLangSet];
 
   return {
     tosText,

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