From 4bf1ab8ba924b2a0fc4813814bdeeb66a2928382 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 3 Apr 2024 13:37:27 -0300
Subject: wip #8655: fixing broken build

---
 .../src/paths/instance/templates/update/UpdatePage.tsx               | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx')

diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx
index f4092b61b..cf1c13fc4 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx
@@ -23,6 +23,7 @@ import {
   AmountString,
   Amounts,
   Duration,
+  TalerError,
   TalerMerchantApi,
   assertUnreachable
 } from "@gnu-taler/taler-util";
@@ -91,7 +92,7 @@ export function UpdatePage({ template, onUpdate, onBack }: Props): VNode {
     type: intialStep,
   });
   const devices = useInstanceOtpDevices()
-  const deviceList = !devices.ok ? [] : devices.data.otp_devices
+  const deviceList = !devices || devices instanceof TalerError || devices.type === "fail" ? [] : devices.body
 
   const parsedPrice = !state.amount
     ? undefined
@@ -129,7 +130,7 @@ export function UpdatePage({ template, onUpdate, onBack }: Props): VNode {
   };
 
   const hasErrors = Object.keys(errors).some(
-    (k) => (errors as any)[k] !== undefined,
+    (k) => (errors as Record<string,unknown>)[k] !== undefined,
   );
 
   const submitForm = () => {
-- 
cgit v1.2.3

