aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/components/form
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-06-03 13:11:07 -0300
committerSebastian <sebasjm@gmail.com>2024-06-03 13:11:07 -0300
commitaac3878f5915d4742d253ad13b076a20f011e403 (patch)
tree54938dc4300eab5146fef17e7ca82fa7e59f5f75 /packages/merchant-backoffice-ui/src/components/form
parent228324bb4411515675930e68eece2045dcafe12a (diff)
downloadwallet-core-aac3878f5915d4742d253ad13b076a20f011e403.tar.xz
check account info match
Diffstat (limited to 'packages/merchant-backoffice-ui/src/components/form')
-rw-r--r--packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx35
1 files changed, 4 insertions, 31 deletions
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<T>({
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<T>({
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 (
<InputGroup name="payto" label={label} fixed tooltip={tooltip}>
<FormProvider<Entity>