File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
packages/composites/glv-token/src Expand file tree Collapse file tree 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(
6060 required : true ,
6161 default : 'https://arbitrum-api.gmxinfra.io/tokens' ,
6262 } ,
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+ } ,
6370 METADATA_REFRESH_INTERVAL_MS : {
6471 description : 'The amount of time the metadata should be refreshed' ,
6572 type : 'number' ,
Original file line number Diff line number Diff line change @@ -109,8 +109,10 @@ export abstract class BaseGlvTransport<
109109 const requestConfig = {
110110 url : this . settings . TOKEN_INFO_API ,
111111 method : 'GET' ,
112+ timeout : this . settings . GLV_INFO_API_TIMEOUT_MS ,
112113 }
113114
115+ logger . info ( 'Fetching token info' )
114116 const response = await this . requester . request < { tokens : Token [ ] } > (
115117 JSON . stringify ( requestConfig ) ,
116118 requestConfig ,
@@ -127,8 +129,10 @@ export abstract class BaseGlvTransport<
127129 const requestConfig = {
128130 url : this . settings . MARKET_INFO_API ,
129131 method : 'GET' ,
132+ timeout : this . settings . GLV_INFO_API_TIMEOUT_MS ,
130133 }
131134
135+ logger . info ( 'Fetching market info' )
132136 const response = await this . requester . request < { markets : Market [ ] } > (
133137 JSON . stringify ( requestConfig ) ,
134138 requestConfig ,
You can’t perform that action at this time.
0 commit comments