-
Notifications
You must be signed in to change notification settings - Fork 237
[HOT FIX] Fix blockscout urls #763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ const getAddressActivity = async ( | |
| return cacheFetch( | ||
| { | ||
| // Note: would like to add offset=50 (i.e. results per page) but it seems to cause polygon API to hang | ||
| url: `${endpoint}module=account&action=txlist&address=${address}&sort=desc`, | ||
| url: `${endpoint}${endpoint.includes('blockscout.com') ? 'api?': ''}module=account&action=txlist&address=${address}&sort=desc`, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainVerify the conditional logic once configs.ts is fixed. After removing Run this verification script after applying the config changes to ensure all Blockscout URLs are formed correctly: 🏁 Script executed: #!/bin/bash
# Description: Verify all Blockscout endpoint definitions and their usage pattern
echo "=== Checking Blockscout endpoints in configs.ts ==="
rg -n "blockscout\.(com|network)" packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts
echo -e "\n=== Verifying no double 'api?' in constructed URLs ==="
# Check if any endpoint still has 'api?' that would conflict with the conditional
rg -n "blockscout.*api\?" packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.tsLength of output: 975 Prevent double 🤖 Prompt for AI Agents |
||
| headers, | ||
| }, | ||
| TTL, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: Incomplete fix will break other Blockscout networks.
Only Rootstock endpoints were updated to remove
api?, but other Blockscout endpoints (lines 4, 6, 9, 10, 11, 38, 71) still includeapi?. The conditional logic added inindex.tsat line 24 checks for'blockscout.com'and will addapi?to all matching endpoints, causing doubleapi?in URLs for those networks.For example, Ethereum's endpoint
https://eth.blockscout.com/api?will become:This will break API calls for Ethereum, Matic, KaruraEVM, AstarEVM, ShidenEVM, Aurora, and EthereumClassic.
Apply this diff to remove
api?from all Blockscout endpoints for consistency:And later in the file:
And:
📝 Committable suggestion
🤖 Prompt for AI Agents