diff options
author | Sebastian <sebasjm@gmail.com> | 2023-09-11 15:07:55 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-09-11 15:08:08 -0300 |
commit | 8c20f4b27946679267bb44255721a9f14ae1077a (patch) | |
tree | 389d7dac804af0e17652240094947e710f503dd3 /packages/merchant-backoffice-ui/src/paths/instance/validators | |
parent | e2422b68ebb2a29fb2e4d86f8a8cf9ec2a33e099 (diff) | |
download | wallet-core-8c20f4b27946679267bb44255721a9f14ae1077a.tar.xz |
new login token
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/validators')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/validators/create/CreatedSuccessfully.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/validators/create/CreatedSuccessfully.tsx b/packages/merchant-backoffice-ui/src/paths/instance/validators/create/CreatedSuccessfully.tsx index 3ad3cb3a3..22ae55677 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/validators/create/CreatedSuccessfully.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/validators/create/CreatedSuccessfully.tsx @@ -18,9 +18,9 @@ import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { Fragment, VNode, h } from "preact"; import { QR } from "../../../../components/exception/QR.js"; import { CreatedSuccessfully as Template } from "../../../../components/notifications/CreatedSuccessfully.js"; -import { useBackendContext } from "../../../../context/backend.js"; import { useInstanceContext } from "../../../../context/instance.js"; import { MerchantBackend } from "../../../../declaration.js"; +import { useBackendContext } from "../../../../context/backend.js"; type Entity = MerchantBackend.OTP.OtpDeviceAddDetails; @@ -38,9 +38,9 @@ export function CreatedSuccessfully({ onConfirm, }: Props): VNode { const { i18n } = useTranslationContext(); - const backend = useBackendContext(); + const { url: backendURL } = useBackendContext() const { id: instanceId } = useInstanceContext(); - const issuer = new URL(backend.url).hostname; + const issuer = new URL(backendURL).hostname; const qrText = `otpauth://totp/${instanceId}/${entity.otp_device_id}?issuer=${issuer}&algorithm=SHA1&digits=8&period=30&secret=${entity.otp_key}`; const qrTextSafe = `otpauth://totp/${instanceId}/${entity.otp_device_id}?issuer=${issuer}&algorithm=SHA1&digits=8&period=30&secret=${entity.otp_key.substring(0, 6)}...`; |