commit 27a1d3216f8562bedddb999c0d35b074f751d49b
parent 59b6c934c54ed5995061a41b2edaa635d465f49a
Author: Sebastian <sebasjm@gmail.com>
Date: Wed, 21 Feb 2024 14:37:37 -0300
SPA e-mail address empty
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/demobank-ui/src/pages/admin/AccountForm.tsx b/packages/demobank-ui/src/pages/admin/AccountForm.tsx
@@ -246,8 +246,8 @@ export function AccountForm<PurposeType extends keyof ChangeByPurposeType>({
password: getRandomPassword(),
username: newForm.username!,
contact_data: undefinedIfEmpty({
- email: newForm.email,
- phone: newForm.phone,
+ email: !newForm.email ? undefined : newForm.email,
+ phone: !newForm.phone ? undefined :newForm.phone,
}),
debit_threshold: threshold ?? config.default_debit_threshold,
cashout_payto_uri: cashoutURI,
@@ -269,8 +269,8 @@ export function AccountForm<PurposeType extends keyof ChangeByPurposeType>({
const result: TalerCorebankApi.AccountReconfiguration = {
cashout_payto_uri: cashoutURI,
contact_data: undefinedIfEmpty({
- email: newForm.email,
- phone: newForm.phone,
+ email: !newForm.email ? undefined : newForm.email,
+ phone: !newForm.phone ? undefined :newForm.phone,
}),
debit_threshold: threshold,
is_public: newForm.isPublic,