diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
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 = () => { |