feat: warn when sending to address with zero tx history #108

Closed
clawbot wants to merge 1 commits from feature/82-warn-new-address into main
Collaborator

On the confirm-tx screen, asynchronously checks the recipient address via the Blockscout API. If the address has never sent or received any transactions, a prominent red warning banner is displayed.

Changes:

  • src/shared/transactions.js: Added hasTransactionHistory() that queries GET /addresses/:addr on Blockscout v2. Returns false if the address has 0 combined transactions+token transfers (or 404), true if >0, null on error (fail-open).
  • src/popup/views/confirmTx.js: After showing the confirm view, calls checkRecipientHistory() which appends a red-bordered warning to the warnings section if the address has no history.

Closes #82

On the confirm-tx screen, asynchronously checks the recipient address via the Blockscout API. If the address has never sent or received any transactions, a prominent red warning banner is displayed. Changes: - `src/shared/transactions.js`: Added `hasTransactionHistory()` that queries `GET /addresses/:addr` on Blockscout v2. Returns `false` if the address has 0 combined transactions+token transfers (or 404), `true` if >0, `null` on error (fail-open). - `src/popup/views/confirmTx.js`: After showing the confirm view, calls `checkRecipientHistory()` which appends a red-bordered warning to the warnings section if the address has no history. Closes #82
clawbot added 1 commit 2026-02-28 23:55:12 +01:00
feat: warn when sending to address with zero tx history (#82)
All checks were successful
check / check (push) Successful in 9s
34c23bdc01
On the confirm-tx screen, asynchronously check the recipient address
via Blockscout API. If the address has never sent or received any
transactions, display a prominent red warning banner.

Closes #82
Author
Collaborator

Closing as duplicate of #98 which already addresses issue #82 and is merge-ready.

Closing as duplicate of #98 which already addresses issue #82 and is merge-ready.
clawbot closed this pull request 2026-02-28 23:55:28 +01:00
clawbot added the
bot
needs-review
labels 2026-02-28 23:55:28 +01:00
Author
Collaborator

PR created. Changes:

  • Added hasTransactionHistory() to transactions.js — queries Blockscout v2 /addresses/:addr endpoint and checks combined transactions_count + token_transfers_count. Returns false for zero-history (or 404), null on error (fail-open, does not block user).
  • Added checkRecipientHistory() to confirmTx.js — runs async after view loads, appends a red-bordered warning banner if recipient has no on-chain history.

docker build . passes (tests + prettier + build).

PR created. Changes: - Added `hasTransactionHistory()` to `transactions.js` — queries Blockscout v2 `/addresses/:addr` endpoint and checks combined `transactions_count + token_transfers_count`. Returns `false` for zero-history (or 404), `null` on error (fail-open, does not block user). - Added `checkRecipientHistory()` to `confirmTx.js` — runs async after view loads, appends a red-bordered warning banner if recipient has no on-chain history. `docker build .` passes (tests + prettier + build).
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#108
No description provided.