@defillama/sdk 5.0.83 → 5.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Balances.d.ts +1 -0
- package/build/Balances.js +3 -0
- package/build/ChainApi.d.ts +1 -0
- package/build/ChainApi.js +3 -0
- package/build/abi/multicall.js +4 -0
- package/build/abi/multicall3.js +1 -0
- package/build/providers.json +1 -1
- package/build/util/graph.js +4 -1
- package/package.json +1 -1
package/build/util/graph.js
CHANGED
|
@@ -34,6 +34,7 @@ async function request(endpoint, query, { cache = false, cacheKey, variables, wi
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
exports.request = request;
|
|
37
|
+
let graphKeyWarned = false;
|
|
37
38
|
function modifyEndpoint(endpoint, network = 'arbitrum') {
|
|
38
39
|
// example: https://api.thegraph.com/subgraphs/name/yieldyak/reinvest-tracker
|
|
39
40
|
let graphKey = (0, env_1.getEnvValue)('GRAPH_API_KEY');
|
|
@@ -43,7 +44,9 @@ function modifyEndpoint(endpoint, network = 'arbitrum') {
|
|
|
43
44
|
return endpoint;
|
|
44
45
|
else if (!graphKey) {
|
|
45
46
|
graphKey = "5a1340b49fa9efe00" + "21452daa260564e";
|
|
46
|
-
|
|
47
|
+
if (!graphKeyWarned)
|
|
48
|
+
console.log("GRAPH_API_KEY env variable is not set, using the default api key");
|
|
49
|
+
graphKeyWarned = true;
|
|
47
50
|
}
|
|
48
51
|
endpoint = endpoint.replace('[api-key]', graphKey);
|
|
49
52
|
return endpoint;
|