From 958747bd08172ce00bc84ea3c543eac414a1d39b Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 7 Apr 2023 17:31:01 -0300 Subject: validate iban --- .../src/wallet/ManageAccount/views.tsx | 99 ++++++++++++---------- 1 file changed, 54 insertions(+), 45 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet/ManageAccount/views.tsx') diff --git a/packages/taler-wallet-webextension/src/wallet/ManageAccount/views.tsx b/packages/taler-wallet-webextension/src/wallet/ManageAccount/views.tsx index 75e1feca4..fb32e5a59 100644 --- a/packages/taler-wallet-webextension/src/wallet/ManageAccount/views.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ManageAccount/views.tsx @@ -21,18 +21,14 @@ import { PaytoUriIBAN, PaytoUriTalerBank, stringifyPaytoUri, + validateIban, } from "@gnu-taler/taler-util"; import { styled } from "@linaria/react"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { ErrorMessage } from "../../components/ErrorMessage.js"; import { SelectList } from "../../components/SelectList.js"; -import { - Input, - SubTitle, - SvgIcon, - WarningText, -} from "../../components/styled/index.js"; +import { Input, SubTitle, SvgIcon } from "../../components/styled/index.js"; import { useTranslationContext } from "../../context/translation.js"; import { Button } from "../../mui/Button.js"; import { TextFieldHandler } from "../../mui/handlers.js"; @@ -111,38 +107,47 @@ export function ReadyView({ description={error} /> )} -

- - + {Object.entries(accountType.list).map(([key, name], idx) => ( +

{ + if (accountType.onChange) { + accountType.onChange(key); + } + }} + > + {name} +
+ ))} + +
+

+ - +

+
+

+

- {accountType.value === "" ? undefined : ( - -

- -

-

- -

-
- )}