gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: Fixes #8084


From: gnunet
Subject: [taler-wallet-core] branch master updated: Fixes #8084
Date: Sun, 14 Jan 2024 22:29:55 +0100

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 68f3bcdc6 Fixes #8084
68f3bcdc6 is described below

commit 68f3bcdc6cece62176849ab065e82630ebc4deae
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Sun Jan 14 18:29:42 2024 -0300

    Fixes #8084
    
    updating the reference state creates an invalid duration value which breaks 
the component
---
 .../src/paths/admin/create/CreatePage.tsx              | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git 
a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx 
b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx
index d13b7e929..f95beba19 100644
--- a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx
@@ -118,21 +118,23 @@ export function CreatePage({ onCreate, onBack, forceId }: 
Props): VNode {
 
   const submit = (): Promise<void> => {
     // use conversion instead of this
-    const newToken = value.auth_token;
-    value.auth_token = undefined;
-    value.auth = newToken === null || newToken === undefined
+    const newValue = structuredClone(value);
+
+    const newToken = newValue.auth_token;
+    newValue.auth_token = undefined;
+    newValue.auth = newToken === null || newToken === undefined
       ? { method: "external" }
       : { method: "token", token: `secret-token:${newToken}` };
-    if (!value.address) value.address = {};
-    if (!value.jurisdiction) value.jurisdiction = {};
+    if (!newValue.address) newValue.address = {};
+    if (!newValue.jurisdiction) newValue.jurisdiction = {};
     // remove above use conversion
     // schema.validateSync(value, { abortEarly: false })
-    value.default_pay_delay = 
Duration.toTalerProtocolDuration(value.default_pay_delay!) as any
-    value.default_wire_transfer_delay = 
Duration.toTalerProtocolDuration(value.default_wire_transfer_delay!) as any
+    newValue.default_pay_delay = 
Duration.toTalerProtocolDuration(newValue.default_pay_delay!) as any
+    newValue.default_wire_transfer_delay = 
Duration.toTalerProtocolDuration(newValue.default_wire_transfer_delay!) as any
     // delete value.default_pay_delay;
     // delete value.default_wire_transfer_delay;
 
-    return onCreate(value as any as 
MerchantBackend.Instances.InstanceConfigurationMessage);
+    return onCreate(newValue as any as 
MerchantBackend.Instances.InstanceConfigurationMessage);
   };
 
   function updateToken(token: string | null) {

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