From aac3878f5915d4742d253ad13b076a20f011e403 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 3 Jun 2024 13:11:07 -0300 Subject: check account info match --- .../src/components/form/InputPaytoForm.tsx | 35 +++------------------- 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'packages/merchant-backoffice-ui/src/components/form') diff --git a/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx b/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx index 3fc4fcbf1..994850b75 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx @@ -221,6 +221,10 @@ export function InputPaytoForm({ const nv = parsePaytoUri(initialValueStr ?? ""); const paths = !initialPayto ? [] : initialPayto.targetPath.split("/"); if (nv !== undefined && nv.isKnown) { + if (nv.targetType === "iban" && paths.length >= 2) { + //FIXME: workaround EBIC not supported + paths[0] = paths[1] + } setValue({ target: nv.targetType, params: nv.params, @@ -279,37 +283,6 @@ export function InputPaytoForm({ onChange(str as any); }, [str]); - // const submit = useCallback((): void => { - // // const accounts: TalerMerchantApi.AccountAddDetails[] = paytos; - // // const alreadyExists = - // // accounts.findIndex((x) => x.payto_uri === paytoURL) !== -1; - // // if (!alreadyExists) { - // const newValue: TalerMerchantApi.AccountAddDetails = { - // payto_uri: paytoURL, - // }; - // if (value.auth) { - // if (value.auth.url) { - // newValue.credit_facade_url = value.auth.url; - // } - // if (value.auth.type === "none") { - // newValue.credit_facade_credentials = { - // type: "none", - // }; - // } - // if (value.auth.type === "basic") { - // newValue.credit_facade_credentials = { - // type: "basic", - // username: value.auth.username ?? "", - // password: value.auth.password ?? "", - // }; - // } - // } - // onChange(newValue as any); - // // } - // // valueHandler(defaultTarget); - // }, [value]); - - //FIXME: translating plural singular return ( -- cgit v1.2.3