summaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/update/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/otp_devices/update/index.tsx')
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/otp_devices/update/index.tsx17
1 files changed, 8 insertions, 9 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/update/index.tsx
index 922a94364..a824c6936 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/update/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/update/index.tsx
@@ -19,30 +19,29 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
+import { HttpStatusCode, TalerErrorDetail, TalerMerchantApi } from "@gnu-taler/taler-util";
import {
ErrorType,
HttpError,
useTranslationContext,
} from "@gnu-taler/web-util/browser";
-import { Fragment, h, VNode } from "preact";
+import { Fragment, VNode, h } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu/index.js";
-import { MerchantBackend, WithId } from "../../../../declaration.js";
-import { Notification } from "../../../../utils/types.js";
-import { UpdatePage } from "./UpdatePage.js";
-import { HttpStatusCode } from "@gnu-taler/taler-util";
import { useOtpDeviceAPI, useOtpDeviceDetails } from "../../../../hooks/otp.js";
+import { Notification } from "../../../../utils/types.js";
import { CreatedSuccessfully } from "../create/CreatedSuccessfully.js";
+import { UpdatePage } from "./UpdatePage.js";
-export type Entity = MerchantBackend.OTP.OtpDevicePatchDetails & WithId;
+export type Entity = TalerMerchantApi.OtpDevicePatchDetails & WithId;
interface Props {
onBack?: () => void;
onConfirm: () => void;
onUnauthorized: () => VNode;
onNotFound: () => VNode;
- onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
+ onLoadError: (e: HttpError<TalerErrorDetail>) => VNode;
vid: string;
}
export default function UpdateValidator({
@@ -56,7 +55,7 @@ export default function UpdateValidator({
const { updateOtpDevice } = useOtpDeviceAPI();
const result = useOtpDeviceDetails(vid);
const [notif, setNotif] = useState<Notification | undefined>(undefined);
- const [keyUpdated, setKeyUpdated] = useState<MerchantBackend.OTP.OtpDeviceAddDetails | null>(null)
+ const [keyUpdated, setKeyUpdated] = useState<TalerMerchantApi.OtpDeviceAddDetails | null>(null)
const { i18n } = useTranslationContext();
@@ -87,7 +86,7 @@ export default function UpdateValidator({
id: vid,
otp_algorithm: result.data.otp_algorithm,
otp_device_description: result.data.device_description,
- otp_key: undefined,
+ otp_key: "",
otp_ctr: result.data.otp_ctr
}}
onBack={onBack}