diff --git a/packages/aml-backoffice-ui/src/account.ts b/packages/aml-backoffice-ui/src/account.ts index 2225bf2ff..615d843c4 100644 --- a/packages/aml-backoffice-ui/src/account.ts +++ b/packages/aml-backoffice-ui/src/account.ts @@ -61,17 +61,20 @@ export function buildQuerySignature(key: SigningKey): string { return encodeCrock(eddsaSign(sigBlob, key)); } + export function buildDecisionSignature( key: SigningKey, decision: AmlExchangeBackend.AmlDecision, ): string { + const zero = new Uint8Array(new ArrayBuffer(64)) const sigBlob = buildSigPS(TalerSignaturePurpose.TALER_SIGNATURE_AML_DECISION) - .put(hash(stringToBytes(decision.justification))) - // .put(timestampRoundedToBuffer(decision.decision_time)) + //TODO: new need the null terminator, also in the exchange + .put(hash(stringToBytes(decision.justification)))//check null + .put(timestampRoundedToBuffer(decision.decision_time)) .put(amountToBuffer(decision.new_threshold)) .put(decodeCrock(decision.h_payto)) - // .put(hash(stringToBytes(decision.kyc_requirements))) + .put(zero) //kyc_requirement .put(bufferForUint32(decision.new_state)) .build(); diff --git a/packages/aml-backoffice-ui/src/hooks/useCases.ts b/packages/aml-backoffice-ui/src/hooks/useCases.ts index c5a0fc489..c07bd5f18 100644 --- a/packages/aml-backoffice-ui/src/hooks/useCases.ts +++ b/packages/aml-backoffice-ui/src/hooks/useCases.ts @@ -85,7 +85,6 @@ export function useCases( const records = !afterData ? [] : ((afterData ?? lastAfter).data ?? { records: [] }).records; - console.log("afterdata", afterData, lastAfter, records) if (loadingAfter) return { loading: true, data: { records } }; if (afterData) { return { ok: true, data: { records }, ...pagination }; diff --git a/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx b/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx index 13e78b169..429cfb9ca 100644 --- a/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx +++ b/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx @@ -38,7 +38,7 @@ export function NewFormEntry({ fullName: "loggedIn_user_fullname", when: AbsoluteTime.now(), state: AmlExchangeBackend.AmlState.pending, - threshold: Amounts.parseOrThrow("ARS:1000"), + threshold: Amounts.parseOrThrow("KUDOS:1000"), }; const api = useAmlCasesAPI()