diff options
author | Sebastian <sebasjm@gmail.com> | 2023-08-04 09:09:00 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-08-04 09:09:00 -0300 |
commit | 6f4548c89259d366b74c4f16ecf4bc57cf35437c (patch) | |
tree | 1d61d4083111aa56b9158dd64e75f1acc55cd3b2 /packages/aml-backoffice-ui/src | |
parent | c12a366d4937a5ede3dfe8cef3111e12fc39f23a (diff) |
fix signature for aml decision
Diffstat (limited to 'packages/aml-backoffice-ui/src')
-rw-r--r-- | packages/aml-backoffice-ui/src/account.ts | 9 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/hooks/useCases.ts | 1 | ||||
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx | 2 |
3 files changed, 7 insertions, 5 deletions
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() |