Skip to content

Commit 1c1751c

Browse files
Satan-web3Satan-web3
Satan-web3
authored and
Satan-web3
committedSep 5, 2024
fix: change instance type in HttpProvider
1 parent c4e5f97 commit 1c1751c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/lib/providers/HttpProvider.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import axios, { Method } from 'axios';
1+
import axios, { Method, AxiosInstance } from 'axios';
22
import { hasProperties, isObject, isValidURL } from '../../utils/validations.js';
3-
import { HeadersType, HttpProviderInstance } from '../../types/Providers.js';
3+
import { HeadersType } from '../../types/Providers.js';
44

55
export default class HttpProvider {
66
host: string;
@@ -9,7 +9,7 @@ export default class HttpProvider {
99
password: string;
1010
headers: HeadersType;
1111
statusPage: string;
12-
instance: HttpProviderInstance;
12+
instance: AxiosInstance;
1313
constructor(host: string, timeout = 30000, user = '', password = '', headers: HeadersType = {}, statusPage = '/') {
1414
if (!isValidURL(host)) throw new Error('Invalid URL provided to HttpProvider');
1515

@@ -55,7 +55,7 @@ export default class HttpProvider {
5555
method = method.toLowerCase() as Method;
5656

5757
return this.instance
58-
.request<{ data: T }>({
58+
.request({
5959
data: method == 'post' && Object.keys(payload).length ? payload : null,
6060
params: method == 'get' && payload,
6161
url,

0 commit comments

Comments
 (0)
Please sign in to comment.