diff options
author | Sebastian <sebasjm@gmail.com> | 2024-02-15 17:18:59 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-02-15 17:18:59 -0300 |
commit | 2c17e98c336d96f955ec82ad0a1b164e3da90103 (patch) | |
tree | a2263112863352a576b23fddb5171225f0dccdcf /packages/aml-backoffice-ui/src | |
parent | 53497d03bb329b05caf3a64fdd47ca3c5bc298f7 (diff) |
fix last commit
Diffstat (limited to 'packages/aml-backoffice-ui/src')
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx | 9 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/CaseDetails.tsx | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx b/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx index 21faff058..bab672192 100644 --- a/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx +++ b/packages/aml-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx @@ -3,6 +3,8 @@ import { AmountJson, Amounts, Codec, + OperationFail, + OperationOk, OperationResult, buildCodecForObject, codecForNumber, @@ -49,7 +51,7 @@ export function AntiMoneyLaunderingForm({ <DefaultForm initial={initial} form={theForm.impl(initial)} - onUpdate={() => {}} + onUpdate={() => { }} onSubmit={(formValue) => { if (formValue.state === undefined || formValue.threshold === undefined) return; @@ -113,10 +115,7 @@ type ParseJustificationFail = export function parseJustification( s: string, listOfAllKnownForms: FormMetadata<any>[], -): OperationResult< - { justification: Justification; metadata: FormMetadata<any> }, - ParseJustificationFail -> { +): OperationOk<{ justification: Justification; metadata: FormMetadata<any> }> | OperationFail<ParseJustificationFail> { try { const justification = JSON.parse(s); const info = codecForSimpleFormMetadata().decode(justification); diff --git a/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx b/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx index 3da3c21ea..0875f047b 100644 --- a/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx +++ b/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx @@ -67,8 +67,10 @@ function titleForJustification(op: ReturnType<typeof parseJustification>, i18n: case "id-not-found": return "error: justification form's id not found" as TranslatedString case "version-not-found": return "error: justification form's version not found" as TranslatedString case "form-not-found": return `error: justification form not found` as TranslatedString + default: { + assertUnreachable(op.case) + } } - assertUnreachable(op.case) } export function getEventsFromAmlHistory( |