Adds a Blockscout-backed check on the confirm-tx screen that warns users when the destination address has zero transaction history (no transactions and no token transfers). The warning is displayed in red with dashed border, consistent with the existing scam-address warning style.
Changes:
src/shared/transactions.js: Added hasZeroTxHistory() — queries Blockscout /addresses/{addr}/counters endpoint, returns true if both transactions_count and token_transfers_count are zero. Fail-open on errors.
src/popup/views/confirmTx.js: Added async checkNewAddress() called from show(). Appends a red warning to the warnings container if the address has no history.
docker build . passes (tests + lint + build).
Closes #82
Adds a Blockscout-backed check on the confirm-tx screen that warns users when the destination address has zero transaction history (no transactions and no token transfers). The warning is displayed in red with dashed border, consistent with the existing scam-address warning style.
**Changes:**
- `src/shared/transactions.js`: Added `hasZeroTxHistory()` — queries Blockscout `/addresses/{addr}/counters` endpoint, returns true if both `transactions_count` and `token_transfers_count` are zero. Fail-open on errors.
- `src/popup/views/confirmTx.js`: Added async `checkNewAddress()` called from `show()`. Appends a red warning to the warnings container if the address has no history.
`docker build .` passes (tests + lint + build).
clawbot
self-assigned this 2026-02-28 23:06:46 +01:00
Closes#82
Adds a Blockscout-backed check that warns users when sending to an
address with no prior transaction history. The warning appears in red
on the confirmation screen. The check is async and fail-open (errors
are silently ignored to avoid blocking legitimate transactions).
src/shared/transactions.js: Added hasZeroTxHistory(address, blockscoutUrl) — queries Blockscout /addresses/{addr}/counters endpoint, returns true if both transactions_count and token_transfers_count are zero. Fail-open on errors.
src/popup/views/confirmTx.js: Added async checkNewAddress() called from show(). Appends a red warning (red text, red dashed border) to the warnings container if the destination has no history. Includes staleness guard (pendingTx !== txInfo).
docker build . passes (tests, lint, build).
Implementation complete. Changes:
- `src/shared/transactions.js`: Added `hasZeroTxHistory(address, blockscoutUrl)` — queries Blockscout `/addresses/{addr}/counters` endpoint, returns `true` if both `transactions_count` and `token_transfers_count` are zero. Fail-open on errors.
- `src/popup/views/confirmTx.js`: Added async `checkNewAddress()` called from `show()`. Appends a red warning (red text, red dashed border) to the warnings container if the destination has no history. Includes staleness guard (`pendingTx !== txInfo`).
`docker build .` passes (tests, lint, build).
clawbot
removed their assignment 2026-02-28 23:07:09 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #82
Adds a Blockscout-backed check on the confirm-tx screen that warns users when the destination address has zero transaction history (no transactions and no token transfers). The warning is displayed in red with dashed border, consistent with the existing scam-address warning style.
Changes:
src/shared/transactions.js: AddedhasZeroTxHistory()— queries Blockscout/addresses/{addr}/countersendpoint, returns true if bothtransactions_countandtoken_transfers_countare zero. Fail-open on errors.src/popup/views/confirmTx.js: Added asynccheckNewAddress()called fromshow(). Appends a red warning to the warnings container if the address has no history.docker build .passes (tests + lint + build).Closing as duplicate of #98 which already addresses issue #82.
Implementation complete. Changes:
src/shared/transactions.js: AddedhasZeroTxHistory(address, blockscoutUrl)— queries Blockscout/addresses/{addr}/countersendpoint, returnstrueif bothtransactions_countandtoken_transfers_countare zero. Fail-open on errors.src/popup/views/confirmTx.js: Added asynccheckNewAddress()called fromshow(). Appends a red warning (red text, red dashed border) to the warnings container if the destination has no history. Includes staleness guard (pendingTx !== txInfo).docker build .passes (tests, lint, build).Pull request closed