mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-14 03:16:24 +00:00
Remove deprecated code
This commit is contained in:
parent
253f3bf6c0
commit
9725be0d71
@ -1,12 +1,6 @@
|
|||||||
import TorModule from '../../lib/native/TorModule';
|
import TorModule from '../../lib/native/TorModule';
|
||||||
|
|
||||||
class TorClient {
|
class TorClient {
|
||||||
daemon: object;
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
this.daemon = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
public get: (baseUrl: string, path: string, headers: object) => Promise<object> = async (
|
public get: (baseUrl: string, path: string, headers: object) => Promise<object> = async (
|
||||||
baseUrl,
|
baseUrl,
|
||||||
path,
|
path,
|
||||||
@ -47,24 +41,6 @@ class TorClient {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
public request: (baseUrl: string, path: string) => Promise<object> = async (
|
|
||||||
baseUrl: string,
|
|
||||||
path,
|
|
||||||
) => {
|
|
||||||
return await new Promise<object>(async (resolve, reject) => {
|
|
||||||
try {
|
|
||||||
// const response = await this.daemon
|
|
||||||
// .request(`${baseUrl}${path}`, 'GET', '', {}, true)
|
|
||||||
// .then((resp) => {
|
|
||||||
// resolve(resp);
|
|
||||||
// });
|
|
||||||
// resolve(response);
|
|
||||||
} catch (error) {
|
|
||||||
reject(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
public post: (baseUrl: string, path: string, body: object, headers: object) => Promise<object> =
|
public post: (baseUrl: string, path: string, body: object, headers: object) => Promise<object> =
|
||||||
async (baseUrl, path, body, headers) => {
|
async (baseUrl, path, body, headers) => {
|
||||||
return await new Promise<object>(async (resolve, reject) => {
|
return await new Promise<object>(async (resolve, reject) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user