From d985c0ba04d06ebc9c584c2e17bed68350d82136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20=C3=81valos?= Date: Fri, 24 May 2024 20:48:05 -0600 Subject: taler-util: remove request id parameter from cancelFn --- packages/taler-util/src/http-impl.qtart.ts | 3 +-- packages/taler-util/src/qtart.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/taler-util/src/http-impl.qtart.ts b/packages/taler-util/src/http-impl.qtart.ts index 65e422168..f60c82fc3 100644 --- a/packages/taler-util/src/http-impl.qtart.ts +++ b/packages/taler-util/src/http-impl.qtart.ts @@ -119,7 +119,6 @@ export class HttpLibImpl implements HttpRequestLibrary { // really support cancellation, so cancellation here just // means that the result is ignored! const { - requestId, promise: fetchProm, cancelFn } = qjsOs.fetchHttp(url, { @@ -139,7 +138,7 @@ export class HttpLibImpl implements HttpRequestLibrary { if (opt?.cancellationToken) { cancelCancelledHandler = opt.cancellationToken.onCancelled(() => { - cancelFn(requestId); + cancelFn(); cancelPromCap.reject(new RequestCancelledError()); }); } diff --git a/packages/taler-util/src/qtart.ts b/packages/taler-util/src/qtart.ts index 373daeae7..6a5984973 100644 --- a/packages/taler-util/src/qtart.ts +++ b/packages/taler-util/src/qtart.ts @@ -18,9 +18,8 @@ export interface QjsHttpOptions { export interface QjsOsLib { fetchHttp(url: string, options?: QjsHttpOptions): { - requestId: number, promise: Promise, - cancelFn: (reqId: number) => number, + cancelFn: () => number, }; postMessageToHost(s: string): void; setMessageFromHostHandler(h: (s: string) => void): void; -- cgit v1.2.3