taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 3da51c5bbce507e5098050d425415eaded00083d
parent 6013852a99ceec3a98dfdaf69461ff78f36b9d00
Author: Florian Dold <dold@taler.net>
Date:   Wed, 19 Aug 2026 18:16:43 +0200

taler-util: preserve optional exchange terms metadata

Diffstat:
Mpackages/taler-util/src/http-client/exchange-client.ts | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/taler-util/src/http-client/exchange-client.ts b/packages/taler-util/src/http-client/exchange-client.ts @@ -1620,14 +1620,14 @@ export class TalerExchangeHttpClient { * https://docs.taler.net/core/api-exchange.html#terms-of-service */ async getTermsMeta(): Promise< - | OperationOk<{ etag: string }> + | OperationOk<{ etag: string | undefined }> | OperationFail<HttpStatusCode.NotFound> | OperationFail<HttpStatusCode.NotImplemented> > { const resp = await this.fetch("terms"); switch (resp.status) { case HttpStatusCode.Ok: { - const etag = resp.headers.get("taler-terms-version") || "unknown"; + const etag = resp.headers.get("taler-terms-version") || undefined; return opFixedSuccess(resp, { etag }); } // The body of these responses is not necessarily a Taler error JSON