fix signature for aml decision
This commit is contained in:
parent
c12a366d49
commit
6f4548c892
@ -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();
|
||||
|
||||
|
@ -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 };
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user