we don't need postForm in the wallet httplib
This commit is contained in:
parent
0032ff9f36
commit
98c15905ea
@ -82,25 +82,6 @@ export class AndroidHttpLib implements HttpRequestLibrary {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
postForm(url: string, form: any): Promise<import("../http").HttpResponse> {
|
|
||||||
if (this.useNfcTunnel) {
|
|
||||||
const myId = this.requestId++;
|
|
||||||
const p = openPromise<HttpResponse>();
|
|
||||||
this.requestMap[myId] = p;
|
|
||||||
const request = {
|
|
||||||
method: "postForm",
|
|
||||||
url,
|
|
||||||
form,
|
|
||||||
};
|
|
||||||
this.sendMessage(
|
|
||||||
JSON.stringify({ type: "tunnelHttp", request, id: myId }),
|
|
||||||
);
|
|
||||||
return p.promise;
|
|
||||||
} else {
|
|
||||||
return this.nodeHttpLib.postForm(url, form);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleTunnelResponse(msg: any) {
|
handleTunnelResponse(msg: any) {
|
||||||
const myId = msg.id;
|
const myId = msg.id;
|
||||||
const p = this.requestMap[myId];
|
const p = this.requestMap[myId];
|
||||||
|
@ -35,8 +35,6 @@ export interface HttpRequestLibrary {
|
|||||||
get(url: string): Promise<HttpResponse>;
|
get(url: string): Promise<HttpResponse>;
|
||||||
|
|
||||||
postJson(url: string, body: any): Promise<HttpResponse>;
|
postJson(url: string, body: any): Promise<HttpResponse>;
|
||||||
|
|
||||||
postForm(url: string, form: any): Promise<HttpResponse>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user