Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/pages/evm/address/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ const TransactionHistory: React.FC<TransactionHistoryProps> = ({
return;
}

searchToBlockRef.current = range.fromBlock;
loadMoreFromBlockRef.current = undefined;
searchToBlockRef.current = undefined;
isAutoSearchRef.current = true;
setAutoSearchPending(false);
setSearchLimit(5);
Expand Down Expand Up @@ -596,6 +596,8 @@ const TransactionHistory: React.FC<TransactionHistoryProps> = ({
<span className="table-status-badge table-status-success">✓ Success</span>
) : tx.receipt?.status === "0x0" || tx.receipt?.status === "0" ? (
<span className="table-status-badge table-status-failed">✗ Failed</span>
) : tx.blockNumber && parseInt(tx.blockNumber, 16) > 0 ? (
<span className="table-status-badge table-status-confirmed">Confirmed</span>
) : (
<span className="table-status-badge table-status-pending">⏳ Pending</span>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down Expand Up @@ -140,7 +140,7 @@ export function useENSResolve(ensName: string | undefined): {
const [loading, setLoading] = useState(false);
const [error, setError] = useState<string | null>(null);

const mainnetRpcUrls = rpcUrls[1];
const mainnetRpcUrls = rpcUrls["eip155:1"];

// Memoize ENSService instance
const ensService = useMemo(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
18 changes: 16 additions & 2 deletions src/services/AddressTransactionSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(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;
}

Expand Down
5 changes: 5 additions & 0 deletions src/styles/tables.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down