From e2e1c5d40e8831cb92fac1e8969883ce12e2336b Mon Sep 17 00:00:00 2001 From: clawbot <35+clawbot@noreply.example.org> Date: Mon, 19 Oct 2026 02:34:13 +0200 Subject: [PATCH] fix: the recipient warning says what it checked and skips addresses that have received ETH (closes #528) The transaction count the node reports is what an address has sent, so an address that only receives, such as a savings address, got the "ZERO transaction history" box on every send. The check now also asks the node for the recipient's balance and warns only when both are zero. The box says the address has never sent a transaction and holds no ETH, naming the active network's native token as the contract warning does. Model: opus-5-5 --- README.md | 8 ++++--- src/popup/index.html | 17 ++++++--------- src/popup/views/confirmTx.js | 9 +++++++- src/shared/addressWarnings.js | 30 ++++++++++++++++++--------- tests/addressWarnings.test.js | 39 +++++++++++++++++++++++++++++++++++ tests/nativeCurrency.test.js | 7 +++++++ tests/rpcErrorLog.test.js | 2 +- 7 files changed, 86 insertions(+), 26 deletions(-) create mode 100644 tests/addressWarnings.test.js diff --git a/README.md b/README.md index dd58982..9b9733f 100644 --- a/README.md +++ b/README.md @@ -1020,7 +1020,7 @@ on the approval screen, the amount on the wait, success and error screens, the transaction history and the transaction detail screen, and the refusal of a fee above 1 ETH. A chain id that names no network reads `ETH`. Wherever this document shows ETH as the label of a native balance, value or fee, in a "Native -ETH transfer" type line, in the contract-recipient warning or in that refusal, +ETH transfer" type line, in the two recipient warnings or in that refusal, Sepolia shows `SepoliaETH`. The swap lines keep `ETH`, the router's own name for the native currency, and the ETH/USD price line, shown on mainnet only, keeps its fixed wording. @@ -1730,8 +1730,10 @@ view would leave a wallet one click from deletion. reserved either way - Warnings: inline warnings from the local checks (scam address, self-send) plus four reserved warning boxes made visible by the async checks — - recipient with no transaction history, recipient is a contract, burn - address, and an Etherscan phishing/scam label + recipient that has never sent a transaction and holds no ETH, recipient is + a contract, burn address, and an Etherscan phishing/scam label. An address + that has received ETH but never sent a transaction still holds that ETH, + so it gets no warning - Errors (insufficient balance), plus three reserved error boxes — the amount plus the fee exceeds the balance (ETH transfers), not enough ETH to pay the fee for the transfer (ERC-20 transfers), and the fee could not be diff --git a/src/popup/index.html b/src/popup/index.html index a433783..3441682 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -634,17 +634,12 @@ - - + +