[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: do not send extra if empty
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: do not send extra if empty |
Date: |
Tue, 02 Jan 2024 16:11:03 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new f0046ec55 do not send extra if empty
f0046ec55 is described below
commit f0046ec557bf8d52aaf5cb13cf03ab98450adc0a
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Jan 2 12:10:55 2024 -0300
do not send extra if empty
---
.../src/paths/instance/orders/create/CreatePage.tsx | 2 +-
packages/merchant-backoffice-ui/src/utils/table.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx
b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx
index 52ee9d351..2b1741276 100644
---
a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx
+++
b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx
@@ -235,7 +235,7 @@ export function CreatePage({
amount: order.pricing.order_price,
summary: order.pricing.summary,
products: productList,
- extra: JSON.stringify(value.extra),
+ extra: undefinedIfEmpty(value.extra),
pay_deadline: value.payments.pay_deadline
? {
t_s: Math.floor(value.payments.pay_deadline.getTime() / 1000),
diff --git a/packages/merchant-backoffice-ui/src/utils/table.ts
b/packages/merchant-backoffice-ui/src/utils/table.ts
index 71358e25f..db2b2021c 100644
--- a/packages/merchant-backoffice-ui/src/utils/table.ts
+++ b/packages/merchant-backoffice-ui/src/utils/table.ts
@@ -51,7 +51,7 @@ export function buildActions<T extends WithId>(
*/
export function undefinedIfEmpty<
T extends Record<string, unknown> | Array<unknown>,
->(obj: T): T | undefined {
+>(obj: T | undefined): T | undefined {
if (obj === undefined) return undefined;
return Object.values(obj).some((v) => v !== undefined) ? obj : undefined;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: do not send extra if empty,
gnunet <=