diff options
author | Iván Ávalos <avalos@disroot.org> | 2024-05-24 20:48:05 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2024-05-27 13:39:06 -0600 |
commit | d985c0ba04d06ebc9c584c2e17bed68350d82136 (patch) | |
tree | 9e4e4d3a6ab9416d111397d600e8b4f064141685 | |
parent | a976b03cd1917d576d084726529427e709d5fe3f (diff) | |
download | wallet-core-d985c0ba04d06ebc9c584c2e17bed68350d82136.tar.xz |
taler-util: remove request id parameter from cancelFn
-rw-r--r-- | packages/taler-util/src/http-impl.qtart.ts | 3 | ||||
-rw-r--r-- | packages/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 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<QjsHttpResp>, - cancelFn: (reqId: number) => number, + cancelFn: () => number, }; postMessageToHost(s: string): void; setMessageFromHostHandler(h: (s: string) => void): void; |