-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
* origin/main: (92 commits) fix: hide first interaction alert if token transfer recipient is internal account (#29389) ci: Migrate LavaMoat validation to GitHub Actions (#29369) ci: Migrate lint CI steps (#29371) ci: Migrate dependency linting (#29370) chore: Update to the latest transaction controller (#29395) fix: Add main frame URL property to req object whenever req is triggered from an iframe (#29337) feat(14507): improve error message for failed txn in activity details view (#29338) fix(28081): design tweak for network badge (#29324) chore: Bump Snaps packages (#29275) fix: Use margin instead of padding for the Snaps UI Container (#29385) fix(29226): fix error for undefined unitInput for sending NFT (#29386) fix: navigation between watch asset approvals (#29279) fix: remove reliance on transaction decode in confirmations (#29341) fix: Adding validation for primary type of types sign signatures (#29379) fix: remove Text in the Activity Empty State (#29318) fix: `gasFeeEstimates` property undefined (#29312) fix: fixed truncation issue for long help text (#29269) test: remove duplicate signature tests (#29377) test: [POM] Migrate watch account tests (#29314) fix: UI is not displaying gas limit set by dapp (#29352) ...
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
diff --git a/dist/multicall.cjs b/dist/multicall.cjs | ||
index bf9aa5e86573fc1651f421cc0b64f5af121c3ab2..43a0531ed86cd3ee1774dcda3f990dd40f7f52de 100644 | ||
--- a/dist/multicall.cjs | ||
+++ b/dist/multicall.cjs | ||
@@ -342,9 +342,22 @@ const multicallOrFallback = async (calls, chainId, provider, maxCallsPerMultical | ||
return []; | ||
} | ||
const multicallAddress = MULTICALL_CONTRACT_BY_CHAINID[chainId]; | ||
- return await (multicallAddress | ||
- ? multicall(calls, multicallAddress, provider, maxCallsPerMulticall) | ||
- : fallback(calls, maxCallsParallel)); | ||
+ if (multicallAddress) { | ||
+ try { | ||
+ return await multicall(calls, multicallAddress, provider, maxCallsPerMulticall); | ||
+ } | ||
+ catch (error) { | ||
+ // Fallback only on revert | ||
+ // https://docs.ethers.org/v5/troubleshooting/errors/#help-CALL_EXCEPTION | ||
+ if (!error || | ||
+ typeof error !== 'object' || | ||
+ !('code' in error) || | ||
+ error.code !== 'CALL_EXCEPTION') { | ||
+ throw error; | ||
+ } | ||
+ } | ||
+ } | ||
+ return await fallback(calls, maxCallsParallel); | ||
}; | ||
exports.multicallOrFallback = multicallOrFallback; | ||
//# sourceMappingURL=multicall.cjs.map | ||
\ No newline at end of file | ||
diff --git a/dist/multicall.mjs b/dist/multicall.mjs | ||
index 8fbe0112303d5df1d868e0357a9d31e43a3b6cf9..860dfdbddd813659cb2be5f7faed5d4016db5966 100644 | ||
--- a/dist/multicall.mjs | ||
+++ b/dist/multicall.mjs | ||
@@ -339,8 +339,21 @@ export const multicallOrFallback = async (calls, chainId, provider, maxCallsPerM | ||
return []; | ||
} | ||
const multicallAddress = MULTICALL_CONTRACT_BY_CHAINID[chainId]; | ||
- return await (multicallAddress | ||
- ? multicall(calls, multicallAddress, provider, maxCallsPerMulticall) | ||
- : fallback(calls, maxCallsParallel)); | ||
+ if (multicallAddress) { | ||
+ try { | ||
+ return await multicall(calls, multicallAddress, provider, maxCallsPerMulticall); | ||
+ } | ||
+ catch (error) { | ||
+ // Fallback only on revert | ||
+ // https://docs.ethers.org/v5/troubleshooting/errors/#help-CALL_EXCEPTION | ||
+ if (!error || | ||
+ typeof error !== 'object' || | ||
+ !('code' in error) || | ||
+ error.code !== 'CALL_EXCEPTION') { | ||
+ throw error; | ||
+ } | ||
+ } | ||
+ } | ||
+ return await fallback(calls, maxCallsParallel); | ||
}; | ||
//# sourceMappingURL=multicall.mjs.map | ||
\ No newline at end of file |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.