summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-02-21 14:37:37 -0300
committerSebastian <sebasjm@gmail.com>2024-02-21 14:37:37 -0300
commit27a1d3216f8562bedddb999c0d35b074f751d49b (patch)
tree119efac9f944fd499c3e96ddd5370fa0ae47a14e
parent59b6c934c54ed5995061a41b2edaa635d465f49a (diff)
downloadwallet-core-27a1d3216f8562bedddb999c0d35b074f751d49b.tar.gz
wallet-core-27a1d3216f8562bedddb999c0d35b074f751d49b.tar.bz2
wallet-core-27a1d3216f8562bedddb999c0d35b074f751d49b.zip
SPA e-mail address empty
-rw-r--r--packages/demobank-ui/src/pages/admin/AccountForm.tsx8
1 files 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
index c63d602b7..5a5ce8c32 100644
--- 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,