diff options
author | Sebastian <sebasjm@gmail.com> | 2023-04-26 14:20:18 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-04-26 14:20:18 -0300 |
commit | 03d3cce8274fcbf6fb9cb8be03e867136f196c5d (patch) | |
tree | 4358ce334c9cccf95755271dbdca46f3eb7787d0 /packages/merchant-backoffice-ui/src/paths/admin | |
parent | 982fc51a97389ef8863de806dab496b0fe2102c6 (diff) |
fix #6363, breaking with merchant backend that accounts implemented
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/admin')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx | 12 |
1 files changed, 7 insertions, 5 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 index 0ef1f1270..4087908a2 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx @@ -47,7 +47,7 @@ interface Props { function with_defaults(id?: string): Partial<Entity> { return { id, - payto_uris: [], + accounts: [], user_type: "business", default_pay_delay: { d_us: 2 * 1000 * 60 * 60 * 1000 }, // two hours default_wire_fee_amortization: 1, @@ -75,12 +75,14 @@ export function CreatePage({ onCreate, onBack, forceId }: Props): VNode { : 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 + accounts: + !value.accounts || !value.accounts.length ? i18n.str`required` : undefinedIfEmpty( - value.payto_uris.map((p) => { - return !PAYTO_REGEX.test(p) ? i18n.str`is not valid` : undefined; + value.accounts.map((p) => { + return !PAYTO_REGEX.test(p.payto_uri) + ? i18n.str`is not valid` + : undefined; }), ), default_max_deposit_fee: !value.default_max_deposit_fee |