diff options
Diffstat (limited to 'packages/aml-backoffice-ui')
-rw-r--r-- | packages/aml-backoffice-ui/src/hooks/account.ts (renamed from packages/aml-backoffice-ui/src/hooks/useCaseDetails.ts) | 6 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/hooks/decisions.ts (renamed from packages/aml-backoffice-ui/src/hooks/useCases.ts) | 62 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/CaseDetails.tsx | 95 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/CaseUpdate.tsx | 24 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/Cases.stories.tsx | 22 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/Cases.tsx | 153 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/ShowConsolidated.stories.tsx | 68 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx | 2 |
8 files changed, 211 insertions, 221 deletions
diff --git a/packages/aml-backoffice-ui/src/hooks/useCaseDetails.ts b/packages/aml-backoffice-ui/src/hooks/account.ts index 78574ada4..1c5f013a7 100644 --- a/packages/aml-backoffice-ui/src/hooks/useCaseDetails.ts +++ b/packages/aml-backoffice-ui/src/hooks/account.ts @@ -20,17 +20,17 @@ import { useOfficer } from "./officer.js"; import { useExchangeApiContext } from "@gnu-taler/web-util/browser"; const useSWR = _useSWR as unknown as SWRHook; -export function useCaseDetails(paytoHash: string) { +export function useAccountInformation(paytoHash: string) { const officer = useOfficer(); const session = officer.state === "ready" ? officer.account : undefined; const { lib: {exchange: api} } = useExchangeApiContext(); async function fetcher([officer, account]: [OfficerAccount, PaytoString]) { - return await api.getDecisionDetails(officer, account) + return await api.getAmlAttributesForAccount(officer, account) } - const { data, error } = useSWR<TalerExchangeResultByMethod<"getDecisionDetails">, TalerHttpError>( + const { data, error } = useSWR<TalerExchangeResultByMethod<"getAmlAttributesForAccount">, TalerHttpError>( !session ? undefined : [session, paytoHash], fetcher, { refreshInterval: 0, refreshWhenHidden: false, diff --git a/packages/aml-backoffice-ui/src/hooks/useCases.ts b/packages/aml-backoffice-ui/src/hooks/decisions.ts index d3a1c1018..e652f233e 100644 --- a/packages/aml-backoffice-ui/src/hooks/useCases.ts +++ b/packages/aml-backoffice-ui/src/hooks/decisions.ts @@ -19,13 +19,12 @@ import { useState } from "preact/hooks"; import { OfficerAccount, OperationOk, - TalerExchangeApi, TalerExchangeResultByMethod, - TalerHttpError, + TalerHttpError } from "@gnu-taler/taler-util"; +import { useExchangeApiContext } from "@gnu-taler/web-util/browser"; import _useSWR, { SWRHook } from "swr"; import { useOfficer } from "./officer.js"; -import { useExchangeApiContext } from "@gnu-taler/web-util/browser"; const useSWR = _useSWR as unknown as SWRHook; export const PAGINATED_LIST_SIZE = 10; @@ -34,12 +33,54 @@ export const PAGINATED_LIST_SIZE = 10; export const PAGINATED_LIST_REQUEST = PAGINATED_LIST_SIZE + 1; /** - * FIXME: mutate result when balance change (transaction ) * @param account * @param args * @returns */ -export function useCases(state: TalerExchangeApi.AmlState) { +export function useCurrentDecisions() { + const officer = useOfficer(); + const session = officer.state === "ready" ? officer.account : undefined; + const { + lib: { exchange: api }, + } = useExchangeApiContext(); + + const [offset, setOffset] = useState<string>(); + + async function fetcher([officer, offset]: [ + OfficerAccount, + string | undefined, + ]) { + return await api.getAmlDecisions(officer, { + order: "asc", + offset, + active: true, + limit: PAGINATED_LIST_REQUEST, + }); + } + + const { data, error } = useSWR< + TalerExchangeResultByMethod<"getAmlDecisions">, + TalerHttpError + >( + !session ? undefined : [session, offset, "getAmlDecisions"], + fetcher, + ); + + if (error) return error; + if (data === undefined) return undefined; + if (data.type !== "ok") return data; + + return buildPaginatedResult(data.body.records, offset, setOffset, (d) => + String(d.rowid), + ); +} + +/** + * @param account + * @param args + * @returns + */ +export function useAccountDecisions(accountStr: string) { const officer = useOfficer(); const session = officer.state === "ready" ? officer.account : undefined; const { @@ -48,23 +89,24 @@ export function useCases(state: TalerExchangeApi.AmlState) { const [offset, setOffset] = useState<string>(); - async function fetcher([officer, state, offset]: [ + async function fetcher([officer, account, offset]: [ OfficerAccount, - TalerExchangeApi.AmlState, + string, string | undefined, ]) { - return await api.getDecisionsByState(officer, state, { + return await api.getAmlDecisions(officer, { order: "asc", offset, + account, limit: PAGINATED_LIST_REQUEST, }); } const { data, error } = useSWR< - TalerExchangeResultByMethod<"getDecisionsByState">, + TalerExchangeResultByMethod<"getAmlDecisions">, TalerHttpError >( - !session ? undefined : [session, state, offset, "getDecisionsByState"], + !session ? undefined : [session, accountStr, offset, "getAmlDecisions"], fetcher, ); diff --git a/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx b/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx index bb936cebf..2fd95d2c6 100644 --- a/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx +++ b/packages/aml-backoffice-ui/src/pages/CaseDetails.tsx @@ -45,7 +45,7 @@ import { useState } from "preact/hooks"; import { privatePages } from "../Routing.js"; import { useUiFormsContext } from "../context/ui-forms.js"; import { preloadedForms } from "../forms/index.js"; -import { useCaseDetails } from "../hooks/useCaseDetails.js"; +import { useAccountInformation } from "../hooks/account.js"; import { ShowConsolidated } from "./ShowConsolidated.js"; export type AmlEvent = @@ -77,7 +77,7 @@ type KycCollectionEvent = { when: AbsoluteTime; title: TranslatedString; values: object; - provider: string; + provider?: string; }; type KycExpirationEvent = { type: "kyc-expiration"; @@ -115,45 +115,54 @@ function titleForJustification( } export function getEventsFromAmlHistory( - aml: TalerExchangeApi.AmlDecisionDetail[], - kyc: TalerExchangeApi.KycDetail[], + events: TalerExchangeApi.KycAttributeCollectionEvent[], i18n: InternationalizationAPI, forms: FormMetadata[], ): AmlEvent[] { - const ae: AmlEvent[] = aml.map((a) => { - const just = parseJustification(a.justification, forms); + // const ae: AmlEvent[] = aml.map((a) => { + // const just = parseJustification(a.justification, forms); + // return { + // type: just.type === "ok" ? "aml-form" : "aml-form-error", + // state: a.new_state, + // threshold: Amounts.parseOrThrow(a.new_threshold), + // title: titleForJustification(just, i18n), + // metadata: just.type === "ok" ? just.body.metadata : undefined, + // justification: just.type === "ok" ? just.body.justification : undefined, + // when: { + // t_ms: + // a.decision_time.t_s === "never" + // ? "never" + // : a.decision_time.t_s * 1000, + // }, + // } as AmlEvent; + // }); + // const ke = kyc.reduce((prev, k) => { + // prev.push({ + // type: "kyc-collection", + // title: i18n.str`collection`, + // when: AbsoluteTime.fromProtocolTimestamp(k.collection_time), + // values: !k.attributes ? {} : k.attributes, + // provider: k.provider_section, + // }); + // prev.push({ + // type: "kyc-expiration", + // title: i18n.str`expiration`, + // when: AbsoluteTime.fromProtocolTimestamp(k.expiration_time), + // fields: !k.attributes ? [] : Object.keys(k.attributes), + // }); + // return prev; + // }, [] as AmlEvent[]); + + const ke = events.map((event) => { return { - type: just.type === "ok" ? "aml-form" : "aml-form-error", - state: a.new_state, - threshold: Amounts.parseOrThrow(a.new_threshold), - title: titleForJustification(just, i18n), - metadata: just.type === "ok" ? just.body.metadata : undefined, - justification: just.type === "ok" ? just.body.justification : undefined, - when: { - t_ms: - a.decision_time.t_s === "never" - ? "never" - : a.decision_time.t_s * 1000, - }, - } as AmlEvent; - }); - const ke = kyc.reduce((prev, k) => { - prev.push({ type: "kyc-collection", title: i18n.str`collection`, - when: AbsoluteTime.fromProtocolTimestamp(k.collection_time), - values: !k.attributes ? {} : k.attributes, - provider: k.provider_section, - }); - prev.push({ - type: "kyc-expiration", - title: i18n.str`expiration`, - when: AbsoluteTime.fromProtocolTimestamp(k.expiration_time), - fields: !k.attributes ? [] : Object.keys(k.attributes), - }); - return prev; - }, [] as AmlEvent[]); - return ae.concat(ke).sort(selectSooner); + when: AbsoluteTime.fromProtocolTimestamp(event.collection_time), + values: !event.attributes ? {} : event.attributes, + provider: event.provider_name, + } as AmlEvent + }); + return ke.sort(selectSooner); } export function CaseDetails({ account }: { account: string }) { @@ -164,7 +173,7 @@ export function CaseDetails({ account }: { account: string }) { }>(); const { i18n } = useTranslationContext(); - const details = useCaseDetails(account); + const details = useAccountInformation(account); const { forms } = useUiFormsContext(); const allForms = [...forms, ...preloadedForms(i18n)]; @@ -176,7 +185,7 @@ export function CaseDetails({ account }: { account: string }) { } if (details.type === "fail") { switch (details.case) { - case HttpStatusCode.Unauthorized: + // case HttpStatusCode.Unauthorized: case HttpStatusCode.Forbidden: case HttpStatusCode.NotFound: case HttpStatusCode.Conflict: @@ -185,11 +194,11 @@ export function CaseDetails({ account }: { account: string }) { assertUnreachable(details); } } - const { aml_history, kyc_attributes } = details.body; + const { details: accountDetails } = details.body; + const events = getEventsFromAmlHistory( - aml_history, - kyc_attributes, + accountDetails, i18n, allForms, ); @@ -424,9 +433,9 @@ function parseJustification( listOfAllKnownForms: FormMetadata[], ): | OperationOk<{ - justification: Justification; - metadata: FormMetadata; - }> + justification: Justification; + metadata: FormMetadata; + }> | OperationFail<ParseJustificationFail> { try { const justification = JSON.parse(s); diff --git a/packages/aml-backoffice-ui/src/pages/CaseUpdate.tsx b/packages/aml-backoffice-ui/src/pages/CaseUpdate.tsx index 7801625d0..d1257c8fa 100644 --- a/packages/aml-backoffice-ui/src/pages/CaseUpdate.tsx +++ b/packages/aml-backoffice-ui/src/pages/CaseUpdate.tsx @@ -157,20 +157,25 @@ export function CaseUpdate({ value: validatedForm, }; - const decision: Omit<TalerExchangeApi.AmlDecision, "officer_sig"> = + const decision: Omit<TalerExchangeApi.AmlDecisionRequest, "officer_sig"> = { justification: JSON.stringify(justification), decision_time: TalerProtocolTimestamp.now(), h_payto: account, - new_state: justification.value - .state as TalerExchangeApi.AmlState, - new_threshold: Amounts.stringify( - justification.value.threshold as AmountJson, - ), - kyc_requirements: undefined, + keep_investigating: false, + new_rules: { + custom_measures: {}, + expiration_time: { + t_s: "never" + }, + rules: [], + successor_measure: undefined + }, + properties: {}, + new_measure: undefined, }; - return api.addDecisionDetails(officer.account, decision); + return api.makeAmlDesicion(officer.account, decision); }, () => { window.location.href = privatePages.cases.url({}); @@ -178,10 +183,9 @@ export function CaseUpdate({ (fail) => { switch (fail.case) { case HttpStatusCode.Forbidden: - case HttpStatusCode.Unauthorized: return i18n.str`Wrong credentials for "${officer.account}"`; case HttpStatusCode.NotFound: - return i18n.str`Officer or account not found`; + return i18n.str`The account was not found`; case HttpStatusCode.Conflict: return i18n.str`Officer disabled or more recent decision was already submitted.`; default: diff --git a/packages/aml-backoffice-ui/src/pages/Cases.stories.tsx b/packages/aml-backoffice-ui/src/pages/Cases.stories.tsx index 22a6d1867..372fb912f 100644 --- a/packages/aml-backoffice-ui/src/pages/Cases.stories.tsx +++ b/packages/aml-backoffice-ui/src/pages/Cases.stories.tsx @@ -21,21 +21,33 @@ import * as tests from "@gnu-taler/web-util/testing"; import { CasesUI as TestedComponent } from "./Cases.js"; -import { AmountString, TalerExchangeApi } from "@gnu-taler/taler-util"; export default { title: "cases", }; export const OneRow = tests.createExample(TestedComponent, { - filter: TalerExchangeApi.AmlState.normal, - onChangeFilter: () => null, records: [ { - current_state: TalerExchangeApi.AmlState.normal, + // current_state: TalerExchangeApi.AmlState.normal, h_payto: "QWEQWEQWEQWE", rowid: 1, - threshold: "USD:1" as AmountString, + decision_time: { + t_s: "never" + }, + is_active: false, + limits: { + custom_measures: {}, + expiration_time: { + t_s: "never" + }, + rules: [], + successor_measure: undefined, + }, + to_investigate: false, + justification: undefined, + properties: undefined, + // threshold: "USD:1" as AmountString, }, ], }); diff --git a/packages/aml-backoffice-ui/src/pages/Cases.tsx b/packages/aml-backoffice-ui/src/pages/Cases.tsx index f66eca33f..613e57493 100644 --- a/packages/aml-backoffice-ui/src/pages/Cases.tsx +++ b/packages/aml-backoffice-ui/src/pages/Cases.tsx @@ -29,8 +29,7 @@ import { useTranslationContext, } from "@gnu-taler/web-util/browser"; import { Fragment, VNode, h } from "preact"; -import { useEffect, useState } from "preact/hooks"; -import { useCases } from "../hooks/useCases.js"; +import { useCurrentDecisions } from "../hooks/decisions.js"; import { privatePages } from "../Routing.js"; import { FormErrors, RecursivePartial, useFormState } from "../hooks/form.js"; @@ -38,58 +37,58 @@ import { undefinedIfEmpty } from "./CreateAccount.js"; import { Officer } from "./Officer.js"; type FormType = { - state: TalerExchangeApi.AmlState; + // state: TalerExchangeApi.AmlState; }; export function CasesUI({ records, - filter, - onChangeFilter, + // filter, + // onChangeFilter, onFirstPage, onNext, }: { onFirstPage?: () => void; onNext?: () => void; - filter: TalerExchangeApi.AmlState; - onChangeFilter: (f: TalerExchangeApi.AmlState) => void; - records: TalerExchangeApi.AmlRecord[]; + // filter: TalerExchangeApi.AmlState; + // onChangeFilter: (f: TalerExchangeApi.AmlState) => void; + records: TalerExchangeApi.AmlDecision[]; }): VNode { const { i18n } = useTranslationContext(); - const [form, status] = useFormState<FormType>( - [".state"] as Array<UIHandlerId>, - { - state: filter, - }, - (state) => { - const errors = undefinedIfEmpty<FormErrors<FormType>>({ - state: state.state === undefined ? i18n.str`required` : undefined, - }); - if (errors === undefined) { - const result: FormType = { - state: state.state!, - }; - return { - status: "ok", - result, - errors, - }; - } - const result: RecursivePartial<FormType> = { - state: state.state, - }; - return { - status: "fail", - result, - errors, - }; - }, - ); - useEffect(() => { - if (status.status === "ok" && filter !== status.result.state) { - onChangeFilter(status.result.state); - } - }, [form?.state?.value]); + // const [form, status] = useFormState<FormType>( + // [".state"] as Array<UIHandlerId>, + // { + // // state: filter, + // }, + // (state) => { + // const errors = undefinedIfEmpty<FormErrors<FormType>>({ + // state: state.state === undefined ? i18n.str`required` : undefined, + // }); + // if (errors === undefined) { + // const result: FormType = { + // state: state.state!, + // }; + // return { + // status: "ok", + // result, + // errors, + // }; + // } + // const result: RecursivePartial<FormType> = { + // state: state.state, + // }; + // return { + // status: "fail", + // result, + // errors, + // }; + // }, + // ); + // useEffect(() => { + // if (status.status === "ok" && filter !== status.result.state) { + // onChangeFilter(status.result.state); + // } + // }, [form?.state?.value]); return ( <div> @@ -105,7 +104,7 @@ export function CasesUI({ </p> </div> <div class="px-2"> - <InputChoiceHorizontal<FormType, "state"> + {/* <InputChoiceHorizontal<FormType, "state"> name="state" label={i18n.str`Filter`} handler={form.state} @@ -124,7 +123,7 @@ export function CasesUI({ value: "normal", }, ]} - /> + /> */} </div> </div> <div class="mt-8 flow-root"> @@ -173,34 +172,10 @@ export function CasesUI({ </div> </td> <td class="whitespace-nowrap px-3 py-5 text-sm text-gray-500"> - {((state: TalerExchangeApi.AmlState): VNode => { - switch (state) { - case TalerExchangeApi.AmlState.normal: { - return ( - <span class="inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20"> - Normal - </span> - ); - } - case TalerExchangeApi.AmlState.pending: { - return ( - <span class="inline-flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-700 ring-1 ring-inset ring-green-600/20"> - Pending - </span> - ); - } - case TalerExchangeApi.AmlState.frozen: { - return ( - <span class="inline-flex items-center rounded-md bg-red-50 px-2 py-1 text-xs font-medium text-red-700 ring-1 ring-inset ring-green-600/20"> - Frozen - </span> - ); - } - } - })(r.current_state)} + {r.rowid} </td> <td class="whitespace-nowrap px-3 py-5 text-sm text-gray-900"> - {r.threshold} + ??? </td> </tr> ); @@ -217,11 +192,11 @@ export function CasesUI({ } export function Cases() { - const [stateFilter, setStateFilter] = useState( - TalerExchangeApi.AmlState.pending, - ); + // const [stateFilter, setStateFilter] = useState( + // TalerExchangeApi.AmlState.pending, + // ); - const list = useCases(stateFilter); + const list = useCurrentDecisions(); const { i18n } = useTranslationContext(); if (!list) { @@ -238,28 +213,38 @@ export function Cases() { <Fragment> <Attention type="danger" title={i18n.str`Operation denied`}> <i18n.Translate> - This account doesn't have access. Request account activation - sending your public key. + This account signature is wrong, contact administrator or create a new one. + </i18n.Translate> + </Attention> + <Officer /> + </Fragment> + ); + } + case HttpStatusCode.NotFound: { + return ( + <Fragment> + <Attention type="danger" title={i18n.str`Operation denied`}> + <i18n.Translate> + This account is not known. </i18n.Translate> </Attention> <Officer /> </Fragment> ); } - case HttpStatusCode.Unauthorized: { + case HttpStatusCode.Conflict: { return ( <Fragment> <Attention type="danger" title={i18n.str`Operation denied`}> <i18n.Translate> - This account is not allowed to perform list the cases. + This account doesn't have access. Request account activation + sending your public key. </i18n.Translate> </Attention> <Officer /> </Fragment> ); } - case HttpStatusCode.NotFound: - case HttpStatusCode.Conflict: return <Officer />; default: assertUnreachable(list); @@ -271,10 +256,10 @@ export function Cases() { records={list.body} onFirstPage={list.isFirstPage ? undefined : list.loadFirst} onNext={list.isLastPage ? undefined : list.loadNext} - filter={stateFilter} - onChangeFilter={(d) => { - setStateFilter(d); - }} + // filter={stateFilter} + // onChangeFilter={(d) => { + // setStateFilter(d); + // }} /> ); } diff --git a/packages/aml-backoffice-ui/src/pages/ShowConsolidated.stories.tsx b/packages/aml-backoffice-ui/src/pages/ShowConsolidated.stories.tsx index 714bf6580..2fc661bd4 100644 --- a/packages/aml-backoffice-ui/src/pages/ShowConsolidated.stories.tsx +++ b/packages/aml-backoffice-ui/src/pages/ShowConsolidated.stories.tsx @@ -42,7 +42,7 @@ const nullTranslator: InternationalizationAPI = { }; export const WithEmptyHistory = tests.createExample(TestedComponent, { - history: getEventsFromAmlHistory([], [], nullTranslator, []), + history: getEventsFromAmlHistory([], nullTranslator, []), until: AbsoluteTime.now(), }); @@ -50,79 +50,17 @@ export const WithSomeEvents = tests.createExample(TestedComponent, { history: getEventsFromAmlHistory( [ { - decider_pub: "JD70N2XZ8FZKB7C146ZWR6XBDCS4Z84PJKJMPB73PMJ2B1X35ZFG", - justification: - '{"index":0,"name":"Simple comment","value":{"fullName":"loggedIn_user_fullname","when":{"t_ms":1700207199558},"state":1,"threshold":{"currency":"STATER","fraction":0,"value":0},"comment":"test"}}', - new_threshold: "STATER:0" as AmountString, - new_state: 1, - decision_time: { - t_s: 1700208199, - }, - }, - { - decider_pub: "JD70N2XZ8FZKB7C146ZWR6XBDCS4Z84PJKJMPB73PMJ2B1X35ZFG", - justification: - '{"index":0,"name":"Simple comment","value":{"fullName":"loggedIn_user_fullname","when":{"t_ms":1700207199558},"state":1,"threshold":{"currency":"STATER","fraction":0,"value":0},"comment":"test"}}', - new_threshold: "STATER:0" as AmountString, - new_state: 1, - decision_time: { - t_s: 1700208211, - }, - }, - { - decider_pub: "JD70N2XZ8FZKB7C146ZWR6XBDCS4Z84PJKJMPB73PMJ2B1X35ZFG", - justification: - '{"index":0,"name":"Simple comment","value":{"fullName":"loggedIn_user_fullname","when":{"t_ms":1700207199558},"state":1,"threshold":{"currency":"STATER","fraction":0,"value":0},"comment":"test"}}', - new_threshold: "STATER:0" as AmountString, - new_state: 1, - decision_time: { - t_s: 1700208220, - }, - }, - { - decider_pub: "JD70N2XZ8FZKB7C146ZWR6XBDCS4Z84PJKJMPB73PMJ2B1X35ZFG", - justification: - '{"index":4,"name":"Declaration for trusts (902.13e)","value":{"fullName":"loggedIn_user_fullname","when":{"t_ms":1700208362854},"state":1,"threshold":{"currency":"STATER","fraction":0,"value":0},"contractingPartner":"f","knownAs":"a","trust":{"name":"b","type":"discretionary","revocability":"irrevocable"}}}', - new_threshold: "STATER:0" as AmountString, - new_state: 1, - decision_time: { - t_s: 1700208385, - }, - }, - { - decider_pub: "6CD3J8XSKWQPFFDJY4SP4RK2D7T7WW7JRJDTXHNZY7YKGXDCE2QG", - justification: - '{"id":"simple_comment","label":"Simple comment","version":1,"value":{"when":{"t_ms":1700488420810},"state":1,"threshold":{"currency":"STATER","fraction":0,"value":0},"comment":"qwe"}}', - new_threshold: "STATER:0" as AmountString, - new_state: 1, - decision_time: { - t_s: 1700488423, - }, - }, - { - decider_pub: "6CD3J8XSKWQPFFDJY4SP4RK2D7T7WW7JRJDTXHNZY7YKGXDCE2QG", - justification: - '{"id":"simple_comment","label":"Simple comment","version":1,"value":{"when":{"t_ms":1700488671251},"state":1,"threshold":{"currency":"STATER","fraction":0,"value":0},"comment":"asd asd asd "}}', - new_threshold: "STATER:0" as AmountString, - new_state: 1, - decision_time: { - t_s: 1700488677, - }, - }, - ], - [ - { collection_time: AbsoluteTime.toProtocolTimestamp( AbsoluteTime.subtractDuraction( AbsoluteTime.now(), Duration.fromPrettyString("1d"), ), ), - expiration_time: { t_s: "never" }, - provider_section: "asd", + provider_name: "asd", attributes: { email: "sebasjm@qwdde.com", }, + rowid: 1, }, ], nullTranslator, diff --git a/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx b/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx index cdc5d0bc1..2fbbefe0c 100644 --- a/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx +++ b/packages/aml-backoffice-ui/src/pages/ShowConsolidated.tsx @@ -125,7 +125,7 @@ interface Consolidated { kyc: { [field: string]: { value: unknown; - provider: string; + provider?: string; since: AbsoluteTime; }; }; |