From 55786d13500ca1834bec9c7084d09afb0c0d5363 Mon Sep 17 00:00:00 2001 From: sneak Date: Fri, 27 Feb 2026 12:52:06 +0700 Subject: [PATCH] Exclude contract calls from dust transaction filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dust filter was hiding contract interactions (approve, transfer, etc.) because they have 0 ETH value, which falls below the dust threshold. Contract calls with 0 ETH are normal — only plain ETH transfers should be checked against the dust threshold. Also captures is_contract and method from Blockscout's transaction response for future use in transaction display. --- src/shared/transactions.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/shared/transactions.js b/src/shared/transactions.js index 4c54753..71a7203 100644 --- a/src/shared/transactions.js +++ b/src/shared/transactions.js @@ -21,6 +21,7 @@ function parseTx(tx, addrLower) { const from = tx.from?.hash || ""; const to = tx.to?.hash || ""; const rawWei = tx.value || "0"; + const toIsContract = tx.to?.is_contract || false; return { hash: tx.hash, blockNumber: tx.block_number, @@ -34,6 +35,8 @@ function parseTx(tx, addrLower) { isError: tx.status !== "ok", contractAddress: null, holders: null, + isContractCall: toIsContract, + method: tx.method || null, }; } @@ -166,9 +169,12 @@ function filterTransactions(txs, filters = {}) { continue; } - // Filter dust transactions (below gwei threshold) if setting is on + // Filter dust transactions (below gwei threshold) if setting is on. + // Contract calls (approve, transfer, etc.) often have 0 ETH value + // and should never be filtered as dust. if ( filters.hideDustTransactions && + !tx.isContractCall && tx.valueGwei !== null && tx.valueGwei < (filters.dustThresholdGwei || 100000) ) {