feat: warn when sending to address with zero tx history #108
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/AutistMask#108
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/82-warn-new-address"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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: AddedhasTransactionHistory()that queriesGET /addresses/:addron Blockscout v2. Returnsfalseif the address has 0 combined transactions+token transfers (or 404),trueif >0,nullon error (fail-open).src/popup/views/confirmTx.js: After showing the confirm view, callscheckRecipientHistory()which appends a red-bordered warning to the warnings section if the address has no history.Closes #82
Closing as duplicate of #98 which already addresses issue #82 and is merge-ready.
PR created. Changes:
hasTransactionHistory()totransactions.js— queries Blockscout v2/addresses/:addrendpoint and checks combinedtransactions_count + token_transfers_count. Returnsfalsefor zero-history (or 404),nullon error (fail-open, does not block user).checkRecipientHistory()toconfirmTx.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).Pull request closed