From cb2059d73e9b94d7b4179680017b962d12fcf790 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 16 Nov 2023 18:53:08 -0300 Subject: show better error message --- packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx') diff --git a/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx b/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx index 5d2a3dffe..faf9671bb 100644 --- a/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx +++ b/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx @@ -13,6 +13,7 @@ import { v1 as form_902_9e_v1 } from "../forms/902_9e.js"; import { v1 as simplest } from "../forms/simplest.js"; import { Pages } from "../pages.js"; import { AmlExchangeBackend } from "../types.js"; +import { useExchangeApiContext } from "../context/config.js"; export type Justification = { // form index in the list of forms @@ -27,11 +28,14 @@ export function AntiMoneyLaunderingForm({ account, selectedForm, onSubmit }: { a const { i18n } = useTranslationContext() const showingFrom = allForms[selectedForm].impl; const formName = allForms[selectedForm].name + + const { config } = useExchangeApiContext() + const initial = { fullName: "loggedIn_user_fullname", when: AbsoluteTime.now(), state: AmlExchangeBackend.AmlState.pending, - threshold: Amounts.parseOrThrow("KUDOS:1000"), + threshold: Amounts.zeroOfCurrency(config.currency), }; return (