taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 516cb7d48f6fc5b077dfb43e2a381b505fc805e7
parent b1322bf4461f36407792e36d2777a63a0744b3d6
Author: Florian Dold <florian@dold.me>
Date:   Mon,  4 Aug 2025 17:37:06 +0200

merchant SPA: remove legacy user_type field

Diffstat:
Mpackages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx | 7-------
Mpackages/merchant-backoffice-ui/src/paths/instance/update/Update.stories.tsx | 1-
Mpackages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx | 5-----
Mpackages/taler-util/src/types-taler-merchant.ts | 18------------------
4 files changed, 0 insertions(+), 31 deletions(-)

diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx @@ -58,7 +58,6 @@ const twoDays = Duration.fromSpec({ days: 2 }); function with_defaults(id?: string): Partial<Entity> { return { id, - user_type: "business", use_stefan: true, default_pay_delay: Duration.toTalerProtocolDuration(twoHours), default_wire_transfer_delay: Duration.toTalerProtocolDuration(twoDays), @@ -80,12 +79,6 @@ export function CreatePage({ onCreate, onBack, forceId }: Props): VNode { ? i18n.str`Invalid` : 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`Must be business or individual` - : undefined, // accounts: // !value.accounts || !value.accounts.length // ? i18n.str`Required` diff --git a/packages/merchant-backoffice-ui/src/paths/instance/update/Update.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/update/Update.stories.tsx @@ -46,7 +46,6 @@ export const Example = createExample(TestedComponent, { name: "name", auth: { method: MerchantAuthMethod.EXTERNAL }, address: {}, - user_type: "business", use_stefan: true, jurisdiction: {}, default_pay_delay: { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx @@ -71,11 +71,6 @@ export function UpdatePage({ const errors = undefinedIfEmpty<FormErrors<Entity>>({ 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`Must be business or individual` - : undefined, default_pay_delay: !value.default_pay_delay ? i18n.str`Required` : !!value.default_wire_transfer_delay && diff --git a/packages/taler-util/src/types-taler-merchant.ts b/packages/taler-util/src/types-taler-merchant.ts @@ -1572,11 +1572,6 @@ export interface InstanceConfigurationMessage { // Merchant name corresponding to this instance. name: string; - // Type of the user (business or individual). - // Defaults to 'business'. Should become mandatory field - // in the future, left as optional for API compatibility for now. - user_type?: string; - // Merchant email for customer contact. email?: string; @@ -1697,11 +1692,6 @@ export interface InstanceReconfigurationMessage { // Merchant name corresponding to this instance. name: string; - // Type of the user (business or individual). - // Defaults to 'business'. Should become mandatory field - // in the future, left as optional for API compatibility for now. - user_type?: string; - // Merchant email for customer contact. email?: string; @@ -1743,9 +1733,6 @@ export interface Instance { // Merchant name corresponding to this instance. name: string; - // Type of the user ("business" or "individual"). - user_type: string; - // Merchant public website. website?: string; @@ -1771,9 +1758,6 @@ export interface QueryInstancesResponse { // Merchant name corresponding to this instance. name: string; - // Type of the user ("business" or "individual"). - user_type: string; - // Merchant email for customer contact. email?: string; @@ -3705,7 +3689,6 @@ export const codecForQueryInstancesResponse = (): Codec<QueryInstancesResponse> => buildCodecForObject<QueryInstancesResponse>() .property("name", codecForString()) - .property("user_type", codecForString()) .property("email", codecOptional(codecForString())) .property("website", codecOptional(codecForString())) .property("logo", codecOptional(codecForString())) @@ -4306,7 +4289,6 @@ export const codecForInstancesResponse = (): Codec<InstancesResponse> => export const codecForInstance = (): Codec<Instance> => buildCodecForObject<Instance>() .property("name", codecForString()) - .property("user_type", codecForString()) .property("website", codecOptional(codecForString())) .property("logo", codecOptional(codecForString())) .property("id", codecForString())