diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-08-15 13:47:29 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-08-15 13:47:29 +0200 |
commit | 819949d7f2cfcce8d334cbfdb701255daac64951 (patch) | |
tree | 592043554f59ec209f9afc1c31c20c4fb585c3ca /packages/aml-backoffice-ui/src/account.ts | |
parent | 77ea209ddb6d457db0ce113f91247207cc29fbd8 (diff) | |
parent | adb0e70f151e63d103f27852312319520f4d0a84 (diff) |
Merge branch 'master' into age-withdraw
Diffstat (limited to 'packages/aml-backoffice-ui/src/account.ts')
-rw-r--r-- | packages/aml-backoffice-ui/src/account.ts | 9 |
1 files changed, 6 insertions, 3 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(); |