summaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-03-22 13:56:16 -0300
committerSebastian <sebasjm@gmail.com>2024-03-26 16:57:58 -0300
commite2bfbced7ab027c901913e83ff7dd82240661990 (patch)
tree33752605ccaf19498f8c2a64e0117db16f22ce26 /packages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx
parent0c265558c4b7b78a13272abf1c4c84e3cf93c987 (diff)
downloadwallet-core-e2bfbced7ab027c901913e83ff7dd82240661990.tar.gz
wallet-core-e2bfbced7ab027c901913e83ff7dd82240661990.tar.bz2
wallet-core-e2bfbced7ab027c901913e83ff7dd82240661990.zip
work in progress, new api being used. merchant now should move into using the full API
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx')
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx
index 83345de3e..930a0d82c 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/otp_devices/create/CreatePage.tsx
@@ -34,7 +34,6 @@ import {
import { Input } from "../../../../components/form/Input.js";
import { InputSelector } from "../../../../components/form/InputSelector.js";
import { InputWithAddon } from "../../../../components/form/InputWithAddon.js";
-import { useBackendContext } from "../../../../context/backend.js";
import { MerchantBackend } from "../../../../declaration.js";
type Entity = MerchantBackend.OTP.OtpDeviceAddDetails;
@@ -49,7 +48,6 @@ const algorithmsNames = ["off", "30s 8d TOTP-SHA1", "30s 8d eTOTP-SHA1"];
export function CreatePage({ onCreate, onBack }: Props): VNode {
const { i18n } = useTranslationContext();
- const backend = useBackendContext();
const [state, setState] = useState<Partial<Entity>>({});
@@ -145,6 +143,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode {
...s,
otp_key: randomRfc3548Base32Key(),
}));
+ e.preventDefault();
}}
>
<i18n.Translate>random</i18n.Translate>