summaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/paths/instance/templates/create/CreatePage.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/templates/create/CreatePage.tsx')
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/templates/create/CreatePage.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/create/CreatePage.tsx
index 31e525226..82c0d0e53 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/templates/create/CreatePage.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/create/CreatePage.tsx
@@ -23,6 +23,7 @@ import {
AmountString,
Amounts,
Duration,
+ TalerError,
TalerMerchantApi,
assertUnreachable,
} from "@gnu-taler/taler-util";
@@ -126,7 +127,7 @@ export function CreatePage({ onCreate, 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 = () => {
@@ -185,7 +186,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode {
// return onCreate(state);
}
};
- const deviceList = !devices.ok ? [] : devices.data.otp_devices;
+ const deviceList = !devices || devices instanceof TalerError || devices.type === "fail" ? [] : devices.body;
return (
<div>