diff options
Diffstat (limited to 'packages/taler-util/src/http-client/exchange.ts')
-rw-r--r-- | packages/taler-util/src/http-client/exchange.ts | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/packages/taler-util/src/http-client/exchange.ts b/packages/taler-util/src/http-client/exchange.ts index 6ab7706b5..4bc888cc4 100644 --- a/packages/taler-util/src/http-client/exchange.ts +++ b/packages/taler-util/src/http-client/exchange.ts @@ -79,6 +79,7 @@ export type TalerExchangeErrorsByMethod< export enum TalerExchangeCacheEviction { CREATE_DESCISION, UPLOAD_KYC_FORM, + MAKE_AML_DECISION, } declare const __pubId: unique symbol; @@ -779,7 +780,7 @@ export class TalerExchangeHttpClient { * https://docs.taler.net/core/api-exchange.html#get--kyc-proof-$PROVIDER_NAME?state=$H_PAYTO * */ - async completeExternalKycProcess(provider: string, state: string) { } + async completeExternalKycProcess(provider: string, state: string) {} // // AML operations @@ -948,8 +949,12 @@ export class TalerExchangeHttpClient { }); switch (resp.status) { - case HttpStatusCode.NoContent: + case HttpStatusCode.NoContent: { + this.cacheEvictor.notifySuccess( + TalerExchangeCacheEviction.MAKE_AML_DECISION, + ); return opEmptySuccess(resp); + } case HttpStatusCode.Forbidden: return opKnownHttpFailure(resp.status, resp); case HttpStatusCode.NotFound: @@ -1028,11 +1033,14 @@ function buildAMLDecisionSignature( .put(hash(stringToBytes(decision.justification))) .put(hash(stringToBytes(canonicalJson(decision.properties) + "\0"))) .put(hash(stringToBytes(canonicalJson(decision.new_rules) + "\0"))) - .put(decision.new_measure != null ? hash(stringToBytes(decision.new_measure)) : zero) + .put( + decision.new_measure != null + ? hash(stringToBytes(decision.new_measure)) + : zero, + ) .put(bufferForUint64(decision.keep_investigating ? 1 : 0)) .build(); - const officer_sig = encodeCrock(eddsaSign(sigBlob, key)); return { |