taler-typescript-core

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

commit d985c0ba04d06ebc9c584c2e17bed68350d82136
parent a976b03cd1917d576d084726529427e709d5fe3f
Author: Iván Ávalos <avalos@disroot.org>
Date:   Fri, 24 May 2024 20:48:05 -0600

taler-util: remove request id parameter from cancelFn

Diffstat:
Mpackages/taler-util/src/http-impl.qtart.ts | 3+--
Mpackages/taler-util/src/qtart.ts | 3+--
2 files changed, 2 insertions(+), 4 deletions(-)

diff --git 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 @@ -18,9 +18,8 @@ export interface QjsHttpOptions { export interface QjsOsLib { fetchHttp(url: string, options?: QjsHttpOptions): { - requestId: number, promise: Promise<QjsHttpResp>, - cancelFn: (reqId: number) => number, + cancelFn: () => number, }; postMessageToHost(s: string): void; setMessageFromHostHandler(h: (s: string) => void): void;