feat: show red warning on confirm-tx for addresses with zero tx history #101

Closed
clawbot wants to merge 1 commits from issue-82-new-address-warning into main
Collaborator

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

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 added the
bot
label 2026-02-28 23:06:46 +01:00
clawbot self-assigned this 2026-02-28 23:06:46 +01:00
clawbot added 1 commit 2026-02-28 23:06:46 +01:00
feat: show red warning on confirm-tx for addresses with zero tx history
All checks were successful
check / check (push) Successful in 9s
6c686997f3
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).
clawbot added the
needs-review
label 2026-02-28 23:06:59 +01:00
Author
Collaborator

Closing as duplicate of #98 which already addresses issue #82.

Closing as duplicate of #98 which already addresses issue #82.
clawbot closed this pull request 2026-02-28 23:07:03 +01:00
Author
Collaborator

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

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
sneak deleted branch issue-82-new-address-warning 2026-03-01 00:29:20 +01:00
All checks were successful
check / check (push) Successful in 9s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/AutistMask#101
No description provided.