Fix Blockscout tx fetch: remove unsupported limit parameter
All checks were successful
check / check (push) Successful in 4s

Blockscout v2 API rejects the `limit` query parameter on
/transactions and /token-transfers endpoints (returns 422).
Remove it and slice results client-side instead.
This commit is contained in:
2026-02-26 02:15:26 +07:00
parent 3bd2b58543
commit a15fb1a761

View File

@@ -51,20 +51,12 @@ async function fetchRecentTransactions(address, blockscoutUrl, count = 25) {
const addrLower = address.toLowerCase();
const [txResp, ttResp] = await Promise.all([
fetch(blockscoutUrl + "/addresses/" + address + "/transactions"),
fetch(
blockscoutUrl +
"/addresses/" +
address +
"/transactions?limit=" +
count,
),
fetch(
blockscoutUrl +
"/addresses/" +
address +
"/token-transfers?limit=" +
count +
"&type=ERC-20",
"/token-transfers?type=ERC-20",
),
]);