gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (d2563c16 -> 8e9bca39)


From: gnunet
Subject: [taler-wallet-core] branch master updated (d2563c16 -> 8e9bca39)
Date: Fri, 03 Jun 2022 17:18:54 +0200

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

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

    from d2563c16 use preact matcher internal api call
     new 78b55181 do not use selection, no need
     new 8e9bca39 do not add provider without salt

The 2 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/anastasis-core/src/index.ts               | 23 ++++++++++++++--------
 .../src/pages/home/SecretSelectionScreen.tsx       |  8 +++-----
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/packages/anastasis-core/src/index.ts 
b/packages/anastasis-core/src/index.ts
index 14ddf815..b5e0517e 100644
--- a/packages/anastasis-core/src/index.ts
+++ b/packages/anastasis-core/src/index.ts
@@ -169,8 +169,8 @@ export class ReducerError extends Error {
   constructor(public errorJson: ErrorDetails) {
     super(
       errorJson.message ??
-        errorJson.hint ??
-        `${TalerErrorCode[errorJson.code]}`,
+      errorJson.hint ??
+      `${TalerErrorCode[errorJson.code]}`,
     );
 
     // Set the prototype explicitly.
@@ -301,6 +301,13 @@ async function getProviderInfo(
   }
   try {
     const jsonResp: EscrowConfigurationResponse = await resp.json();
+    if (!jsonResp.provider_salt) {
+      return {
+        status: "error",
+        code: TalerErrorCode.ANASTASIS_REDUCER_PROVIDER_CONFIG_FAILED,
+        hint: "provider did not have provider salt",
+      }
+    }
     return {
       status: "ok",
       http_status: 200,
@@ -552,8 +559,8 @@ async function uploadSecret(
         "content-type": "application/json",
         ...(paySecret
           ? {
-              "Anastasis-Payment-Identifier": paySecret,
-            }
+            "Anastasis-Payment-Identifier": paySecret,
+          }
           : {}),
       },
       body: JSON.stringify(tur),
@@ -644,8 +651,8 @@ async function uploadSecret(
         [ANASTASIS_HTTP_HEADER_POLICY_META_DATA]: metadataEnc,
         ...(paySecret
           ? {
-              "Anastasis-Payment-Identifier": paySecret,
-            }
+            "Anastasis-Payment-Identifier": paySecret,
+          }
           : {}),
       },
       body: decodeCrock(encRecoveryDoc),
@@ -656,12 +663,12 @@ async function uploadSecret(
       let policyExpiration: TalerProtocolTimestamp = { t_s: 0 };
       try {
         policyVersion = Number(resp.headers.get("Anastasis-Version") ?? "0");
-      } catch (e) {}
+      } catch (e) { }
       try {
         policyExpiration = {
           t_s: Number(resp.headers.get("Anastasis-Policy-Expiration") ?? "0"),
         };
-      } catch (e) {}
+      } catch (e) { }
       successDetails[prov.provider_url] = {
         policy_version: policyVersion,
         policy_expiration: policyExpiration,
diff --git a/packages/anastasis-webui/src/pages/home/SecretSelectionScreen.tsx 
b/packages/anastasis-webui/src/pages/home/SecretSelectionScreen.tsx
index 45d8e46f..2d1a51aa 100644
--- a/packages/anastasis-webui/src/pages/home/SecretSelectionScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/SecretSelectionScreen.tsx
@@ -78,14 +78,12 @@ export function SecretSelectionScreen(): VNode {
       hideNext="Please select version to recover"
     >
       <p>Found versions:</p>
-      {policies.map((x) => (
+      {policies.map((version) => (
         <div>
-          {x.policy_hash} / {x.secret_name}
+          {version.policy_hash} / {version.secret_name}
           <button
             onClick={async () => {
-              await reducer.transition("select_version", {
-                selection: x,
-              });
+              await reducer.transition("select_version", version);
             }}
           >
             Recover

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