File tree 2 files changed +11
-0
lines changed
packages/composites/glv-token/src
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,13 @@ export const config = new AdapterConfig(
60
60
required : true ,
61
61
default : 'https://arbitrum-api.gmxinfra.io/tokens' ,
62
62
} ,
63
+ GLV_INFO_API_TIMEOUT_MS : {
64
+ description :
65
+ 'The amount of time the request to the GLV info APIs should wait before timing out. ' +
66
+ 'Distinct from timeout used to make requests to the EAs which can be set with API_TIMEOUT' ,
67
+ type : 'number' ,
68
+ default : 10_000 ,
69
+ } ,
63
70
METADATA_REFRESH_INTERVAL_MS : {
64
71
description : 'The amount of time the metadata should be refreshed' ,
65
72
type : 'number' ,
Original file line number Diff line number Diff line change @@ -109,8 +109,10 @@ export abstract class BaseGlvTransport<
109
109
const requestConfig = {
110
110
url : this . settings . TOKEN_INFO_API ,
111
111
method : 'GET' ,
112
+ timeout : this . settings . GLV_INFO_API_TIMEOUT_MS ,
112
113
}
113
114
115
+ logger . info ( 'Fetching token info' )
114
116
const response = await this . requester . request < { tokens : Token [ ] } > (
115
117
JSON . stringify ( requestConfig ) ,
116
118
requestConfig ,
@@ -127,8 +129,10 @@ export abstract class BaseGlvTransport<
127
129
const requestConfig = {
128
130
url : this . settings . MARKET_INFO_API ,
129
131
method : 'GET' ,
132
+ timeout : this . settings . GLV_INFO_API_TIMEOUT_MS ,
130
133
}
131
134
135
+ logger . info ( 'Fetching market info' )
132
136
const response = await this . requester . request < { markets : Market [ ] } > (
133
137
JSON . stringify ( requestConfig ) ,
134
138
requestConfig ,
You can’t perform that action at this time.
0 commit comments