From 25346a03fa2577652002583b019fd88dd92a7881 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 25 Apr 2023 00:34:52 -0300 Subject: fix #7796 and some form issues --- .../src/paths/admin/create/CreatePage.tsx | 39 +++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'packages/merchant-backoffice-ui/src/paths') diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx index bf5f5d7c9..0ef1f1270 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx @@ -48,6 +48,7 @@ function with_defaults(id?: string): Partial { return { id, payto_uris: [], + user_type: "business", default_pay_delay: { d_us: 2 * 1000 * 60 * 60 * 1000 }, // two hours default_wire_fee_amortization: 1, default_wire_transfer_delay: { d_us: 1000 * 2 * 60 * 60 * 24 * 1000 }, // two days @@ -69,6 +70,11 @@ export function CreatePage({ onCreate, onBack, forceId }: Props): VNode { ? i18n.str`is not valid` : undefined, name: !value.name ? i18n.str`required` : undefined, + user_type: !value.user_type + ? i18n.str`required` + : value.user_type !== "business" && value.user_type !== "individual" + ? i18n.str`should be business or individual` + : undefined, payto_uris: !value.payto_uris || !value.payto_uris.length ? i18n.str`required` @@ -174,7 +180,13 @@ export function CreatePage({ onCreate, onBack, forceId }: Props): VNode {

+
+
+ {!isTokenSet ? ( +

+ + Access token is not yet configured. This instance can't be + created. + +

+ ) : value.auth_token === undefined ? ( +

+ + No access token. Authorization must be handled externally. + +

+ ) : ( +

+ + Access token is set. Authorization is handled by the + merchant backend. + +

+ )} +
+
-- cgit v1.2.3