From c7b4548d9241718584ced93cc50daef8d05a6706 Mon Sep 17 00:00:00 2001 From: Augusto Lemble Date: Wed, 18 Feb 2026 12:59:32 -0300 Subject: [PATCH 1/2] fix(ens): use correct CAIP-2 key to access mainnet RPC URLs rpcUrls is keyed by CAIP-2 networkId strings (e.g. "eip155:1"), but useSearch, useENS, and the address page were accessing it with the numeric key 1, which always returned undefined. This caused ENS resolution to silently fail with "No Ethereum mainnet RPC configured". Fixes #217 Co-Authored-By: Claude Sonnet 4.6 --- src/components/pages/evm/address/index.tsx | 2 +- src/hooks/useENS.ts | 4 ++-- src/hooks/useSearch.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/pages/evm/address/index.tsx b/src/components/pages/evm/address/index.tsx index 0ef43b3..90c637f 100644 --- a/src/components/pages/evm/address/index.tsx +++ b/src/components/pages/evm/address/index.tsx @@ -69,7 +69,7 @@ export default function Address() { return; } - const mainnetRpcUrls = rpcUrls[1]; + const mainnetRpcUrls = rpcUrls["eip155:1"]; if (!mainnetRpcUrls || mainnetRpcUrls.length === 0) { setEnsError(t("noRPCForEnsResolution")); setEnsResolving(false); diff --git a/src/hooks/useENS.ts b/src/hooks/useENS.ts index efcc7c5..e0c47b9 100644 --- a/src/hooks/useENS.ts +++ b/src/hooks/useENS.ts @@ -40,7 +40,7 @@ export function useENS( const isMainnet = chainId === 1; // Always use mainnet RPC for ENS resolution - const mainnetRpcUrls = rpcUrls[1]; + const mainnetRpcUrls = rpcUrls["eip155:1"]; // Memoize ENSService instance to avoid recreating on every render const ensService = useMemo(() => { @@ -140,7 +140,7 @@ export function useENSResolve(ensName: string | undefined): { const [loading, setLoading] = useState(false); const [error, setError] = useState(null); - const mainnetRpcUrls = rpcUrls[1]; + const mainnetRpcUrls = rpcUrls["eip155:1"]; // Memoize ENSService instance const ensService = useMemo(() => { diff --git a/src/hooks/useSearch.ts b/src/hooks/useSearch.ts index ac6964f..280cc01 100644 --- a/src/hooks/useSearch.ts +++ b/src/hooks/useSearch.ts @@ -36,7 +36,7 @@ export function useSearch(): UseSearchResult { // Return the slug as networkId for backward compatibility const networkId = resolvedNetwork ? networkSlug : undefined; - const mainnetRpcUrls = rpcUrls[1]; + const mainnetRpcUrls = rpcUrls["eip155:1"]; // Memoize ENSService instance const ensService = useMemo(() => { From a6d4198007aebf23f2bd2020751ea50df4eac09f Mon Sep 17 00:00:00 2001 From: Augusto Lemble Date: Wed, 18 Feb 2026 13:36:10 -0300 Subject: [PATCH 2/2] fix(address): fix tx auto-search limit and pending status in parallel mode Two bugs fixed: 1. Auto-search (findRecentActivityRange) was restricting the search to the nearest block range where state changed, meaning if only 1 tx existed in that recent window the search stopped at 1 regardless of the searchLimit=5. Removing the fromBlock restriction lets the binary search scan the full chain and find the N most recent txs. 2. AddressTransactionSearch.extractData was using array[0] for parallel strategy responses, returning the RPCProviderResponse wrapper object instead of the inner RPC data. This caused block fetches to silently return no transactions (block.transactions === undefined) and receipt fetches to produce receipt.status === "success" (wrapper field) instead of "0x1"/"0x0", so every tx showed as Pending. Fixed the helper to detect the RPCProviderResponse shape and extract successfulResponse.data. Also adds a "Confirmed" status badge for mined txs whose receipt is unavailable (blockNumber present but no receipt.status), so they no longer incorrectly show as Pending. Co-Authored-By: Claude Sonnet 4.6 --- .../evm/address/shared/TransactionHistory.tsx | 4 +++- src/services/AddressTransactionSearch.ts | 18 ++++++++++++++++-- src/styles/tables.css | 5 +++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/components/pages/evm/address/shared/TransactionHistory.tsx b/src/components/pages/evm/address/shared/TransactionHistory.tsx index cffa9e5..e8a5bf4 100644 --- a/src/components/pages/evm/address/shared/TransactionHistory.tsx +++ b/src/components/pages/evm/address/shared/TransactionHistory.tsx @@ -230,8 +230,8 @@ const TransactionHistory: React.FC = ({ return; } - searchToBlockRef.current = range.fromBlock; loadMoreFromBlockRef.current = undefined; + searchToBlockRef.current = undefined; isAutoSearchRef.current = true; setAutoSearchPending(false); setSearchLimit(5); @@ -596,6 +596,8 @@ const TransactionHistory: React.FC = ({ ✓ Success ) : tx.receipt?.status === "0x0" || tx.receipt?.status === "0" ? ( ✗ Failed + ) : tx.blockNumber && parseInt(tx.blockNumber, 16) > 0 ? ( + Confirmed ) : ( ⏳ Pending )} diff --git a/src/services/AddressTransactionSearch.ts b/src/services/AddressTransactionSearch.ts index 9cb528e..f549f84 100644 --- a/src/services/AddressTransactionSearch.ts +++ b/src/services/AddressTransactionSearch.ts @@ -80,11 +80,25 @@ type TransactionFoundCallback = ( ) => void; /** - * Extract data from strategy result, handling both fallback and parallel modes + * Extract data from strategy result, handling both fallback and parallel modes. + * In parallel mode, StrategyResult.data is an array of RPCProviderResponse objects. + * We find the first successful response and return its inner data. */ function extractData(data: T | T[] | null | undefined): T | null { if (data === null || data === undefined) return null; - if (Array.isArray(data)) return data[0] ?? null; + if (Array.isArray(data)) { + const firstItem = data[0]; + // Parallel strategy wraps results in RPCProviderResponse objects + if (firstItem && typeof firstItem === "object" && "url" in firstItem && "status" in firstItem) { + // biome-ignore lint/suspicious/noExplicitAny: Provider response shape is dynamic + const successful = (data as any[]).find( + // biome-ignore lint/suspicious/noExplicitAny: Provider response shape is dynamic + (r: any) => r.status === "success" && r.data !== undefined, + ); + return successful ? (successful.data as T) : null; + } + return firstItem ?? null; + } return data; } diff --git a/src/styles/tables.css b/src/styles/tables.css index f70aa10..773df1e 100644 --- a/src/styles/tables.css +++ b/src/styles/tables.css @@ -158,6 +158,11 @@ color: var(--badge-warning-text); } +.table-status-confirmed { + background: var(--overlay-light-5); + color: var(--text-secondary); +} + /* Address Display Tables */ .address-table-container { overflow-x: auto;