wallet-embedded: fetchHttp is now async

This commit is contained in:
Florian Dold 2023-01-10 12:13:22 +01:00
parent 4a781bd0dd
commit cfe33c8e27
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -78,8 +78,7 @@ export interface QjsHttpOptions {
}
export interface QjsOsLib {
// Not async!
fetchHttp(url: string, options?: QjsHttpOptions): QjsHttpResp;
fetchHttp(url: string, options?: QjsHttpOptions): Promise<QjsHttpResp>;
postMessageToHost(s: string): void;
setMessageFromHostHandler(h: (s: string) => void): void;
rename(oldPath: string, newPath: string): number;
@ -145,7 +144,7 @@ export class NativeHttpLib implements HttpRequestLibrary {
data = new ArrayBuffer(0);
}
}
const res = qjsOs.fetchHttp(url, {
const res = await qjsOs.fetchHttp(url, {
method,
data,
headers,