diff --git a/packages/tendermint-rpc/src/rpcclients/http.ts b/packages/tendermint-rpc/src/rpcclients/http.ts index f5a65c81..98f137c3 100644 --- a/packages/tendermint-rpc/src/rpcclients/http.ts +++ b/packages/tendermint-rpc/src/rpcclients/http.ts @@ -19,20 +19,16 @@ export async function http( headers: Record | undefined, request?: any, ): Promise { - if (typeof fetch === "function") { - const settings = { - method: method, - body: request ? JSON.stringify(request) : undefined, - headers: { - // eslint-disable-next-line @typescript-eslint/naming-convention - "Content-Type": "application/json", - ...headers, - }, - }; - return fetch(url, settings) - .then(filterBadStatus) - .then((res: any) => res.json()); - } else { - console.error("no fetch?"); - } + const settings = { + method: method, + body: request ? JSON.stringify(request) : undefined, + headers: { + // eslint-disable-next-line @typescript-eslint/naming-convention + "Content-Type": "application/json", + ...headers, + }, + }; + return fetch(url, settings) + .then(filterBadStatus) + .then((res: any) => res.json()); }