Skip to content

Commit

Permalink
fix: patch timeout for ledger request (#2634)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvvvvv1vvvvvv authored Nov 22, 2024
1 parent cd5c14b commit 56d0164
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions patches/@ledgerhq+hw-app-eth+6.39.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/node_modules/@ledgerhq/hw-app-eth/lib-es/services/ledger/contracts.js b/node_modules/@ledgerhq/hw-app-eth/lib-es/services/ledger/contracts.js
index 806a539..b488b25 100644
--- a/node_modules/@ledgerhq/hw-app-eth/lib-es/services/ledger/contracts.js
+++ b/node_modules/@ledgerhq/hw-app-eth/lib-es/services/ledger/contracts.js
@@ -19,7 +19,7 @@ export const loadInfosForContractMethod = (contractAddress, selector, chainId, u
if (pluginBaseURL) {
const url = `${pluginBaseURL}/plugins/ethereum.json`;
data = yield axios
- .get(`${pluginBaseURL}/plugins/ethereum.json`)
+ .get(`${pluginBaseURL}/plugins/ethereum.json`, { timeout: 5000 })
.then(r => r.data)
.catch(e => {
log("error", "could not fetch from " + url + ": " + String(e));
diff --git a/node_modules/@ledgerhq/hw-app-eth/lib-es/services/ledger/erc20.js b/node_modules/@ledgerhq/hw-app-eth/lib-es/services/ledger/erc20.js
index 16a933e..a2a0f1a 100644
--- a/node_modules/@ledgerhq/hw-app-eth/lib-es/services/ledger/erc20.js
+++ b/node_modules/@ledgerhq/hw-app-eth/lib-es/services/ledger/erc20.js
@@ -21,7 +21,7 @@ export const findERC20SignaturesInfo = (userLoadConfig, chainId) => __awaiter(vo
return null;
const url = `${cryptoassetsBaseURL}/evm/${chainId}/erc20-signatures.json`;
const blob = yield axios
- .get(url)
+ .get(url, { timeout: 5000 })
.then(({ data }) => {
if (!data || typeof data !== "string") {
throw new Error(`ERC20 signatures for chainId ${chainId} file is malformed ${url}`);

0 comments on commit 56d0164

Please sign in to comment.