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) ) {