Commit Graph
100 Commits
Author SHA1 Message Date
sneak de3e0f8ce2 fix: answer the page when a background handler throws (closes #280)
check / check (push) Successful in 26s
handleRpc(...).then(sendResponse) had no .catch(), and sendResponse is the only
thing that settles the dApp's window.ethereum.request() promise. Any throw
inside handleRpc therefore sent nothing back: the content script posted nothing,
and the page's promise stayed pending forever with no error and no timeout,
indistinguishable from a slow wallet. handleRpc does real work -- state loads,
provider calls, transaction population, approval plumbing -- so "it does not
throw today" was not a property anyone was maintaining.

A rejected handleRpc now answers { code: -32603, message }. -32603 is the
JSON-RPC internal error EIP-1474 defines and EIP-1193 defers to for RPC-layer
failures; no EIP-1193 4xxx code describes "the wallet broke" and none was
invented for it. Nothing is stripped or overwritten by this: every deliberately
coded rejection the wallet emits (4001, 4100, 4902) is a returned value, not a
throw, so it travels the resolved path and never reaches this catch. The cause
is not put in the message: the page gets a stable sentence, the background
console gets the method and the throw, so the failure is visible rather than
swallowed.

The two async IIFEs behind AUTISTMASK_TX_RESPONSE and AUTISTMASK_SIGN_RESPONSE
are the same shape one level down. Every statement is inside a try, but a throw
from one of the catch blocks escapes as an unhandled rejection and neither the
popup nor the page is answered. Each gets a last-resort .catch() that settles
the approval through settleApproval() -- the existing chokepoint, with no new
delete or resolve -- and answers the popup. The transaction one tracks the phase
it is in and reports that: an escape from the verify catch runs before
broadcastTransaction() is ever called, so it says the request is gone rather
than that it may still have reached the network, and only an escape from the
broadcast catch keeps the warning about a second send. Every other message
handler on the path is synchronous and cannot leave a promise pending.

Each of the four tests is driven by a real failure rather than a hook in the
handler: a rejecting extension-storage read, which getState() awaits unguarded,
and a failure classifier that throws while classifying a genuine verification or
broadcast failure. All four were demonstrated failing against the unfixed code,
the RPC one with sendResponse at zero calls, which is precisely the page-side
hang. The two transaction cases also assert the sentence describeSigningFailure
builds for each stage, which is the copy the user reads.
2026-08-17 06:01:57 +00:00
sneak d046a24115 scripts-to-rule-them-all (#148)
check / check (push) Successful in 5s
Reviewed-on: #148
Co-authored-by: sneak <sneak@sneak.berlin>
Co-committed-by: sneak <sneak@sneak.berlin>
2026-07-07 02:14:26 +02:00
sneak 3ffc0bec80 TODO (#147)
check / check (push) Successful in 4s
Reviewed-on: #147
Co-authored-by: sneak <sneak@sneak.berlin>
Co-committed-by: sneak <sneak@sneak.berlin>
2026-07-06 21:36:13 +02:00
sneak 3d8feb4c5a Add token management to Settings
check / check (push) Successful in 22s
- Tracked Tokens well in settings with [x] remove buttons
- New settings-addtoken view with:
  - Top-10 quick-pick buttons (tracked ones dimmed+disabled)
  - Top-100 dropdown showing "Token Name (SYMBOL)", tracked disabled
  - Manual contract address entry with RPC lookup
- View comment in helpers.js about keeping README in sync
2026-02-27 17:52:30 +07:00
sneak aca8c4b2a7 Add name and url fields to all 512 tokens in tokenList.js
Names fetched from CoinGecko bulk API (100% coverage).
URLs sourced from ethereum-lists GitHub repo + manual curation
for major tokens. Some lesser-known tokens have empty URLs which
can be populated incrementally.
2026-02-27 17:51:08 +07:00
sneak 9365cd03a6 Resolve all README FIXMEs and add RULES.md audit checklist
check / check (push) Successful in 19s
- Update Architecture tree to match actual src/ structure
- Fix settings button to have border and hover state (Clickable Affordance)
- Cap truncateMiddle to remove at most 10 chars (anti-spoofing guard)
- Raise caller floor from 10 to 32 chars for address display
- Fill in default RPC URL (ethereum-rpc.publicnode.com)
- Fix dependencies table intro (four runtime libs, not two)
- Clean up TODO section: remove all completed items
- Add RULES.md: concise audit checklist derived from README policies
2026-02-27 16:52:00 +07:00
sneak 6b301dee28 Resolve all README FIXMEs and enforce truncation safety
check / check (push) Successful in 18s
- Update Architecture tree to match actual src/ structure
- Fix settings button to have border and hover state (Clickable Affordance)
- Cap truncateMiddle to remove at most 10 chars (anti-spoofing guard)
- Raise caller floor from 10 to 32 chars for address display
- Fill in default RPC URL (ethereum-rpc.publicnode.com)
- Fix dependencies table intro (four runtime libs, not two)
- Clean up TODO section: remove all completed items
2026-02-27 16:48:00 +07:00
sneak d67023e80d Show exact amounts and address titles in transaction detail
check / check (push) Successful in 5s
- Display full-precision amount (no 4-decimal truncation) in the
  transaction detail view, with native quantity (wei/base units) below
- Both amount and native quantity are click-copyable
- Show wallet/address title above from/to when the address is ours
- Update README Display Consistency to document the exception
2026-02-27 16:09:44 +07:00
sneak b9250dab2e Fix layout shift from async USD prices and token balances
Reserve vertical space with min-height and &nbsp; placeholders for all
elements populated by async data: per-address USD totals, ETH price
display, token balance containers, and total value sub-line.  Prevents
buttons and click targets from moving when price API responds.
2026-02-27 16:05:49 +07:00
sneak 9e45c75d29 Implement personal_sign and eth_signTypedData_v4 message signing
check / check (push) Successful in 4s
Replace stub error handlers with full approval flow for personal_sign,
eth_sign, eth_signTypedData_v4, and eth_signTypedData. Uses toolbar
popup only (no fallback window) and keeps sign approvals pending across
popup close/reopen cycles so the user can respond via the toolbar icon.
2026-02-27 15:27:14 +07:00
sneak 5af8a7873d Filter spam tokens from balance display
check / check (push) Successful in 5s
Token balances from Blockscout are now filtered before display.
A token only appears if it meets at least one criterion:
- In the known 511-token list (by contract address)
- Explicitly tracked by the user (added via + Token)
- Has >= 1,000 holders on-chain

Also rejects tokens spoofing a known symbol from a different
contract address (same check used for transaction filtering).

This prevents airdropped spam tokens like "OpenClaw" from
appearing in the wallet without the user ever tracking them.
2026-02-27 13:02:05 +07:00
sneak b64f9b56cc Show contract calls as "Approve USDT" instead of "0.0000 ETH"
check / check (push) Successful in 17s
Contract interactions (approve, swap, etc.) now display the method
name and token symbol instead of the meaningless 0 ETH value.
Blockscout provides the method name and whether the target is a
contract — parseTx uses these plus TOKEN_BY_ADDRESS to produce
labels like "Approve USDT" or "Swap LINK".

Added directionLabel field to parsed transactions so renderers
don't need to know about the sent/received/contract distinction.

Also: clicking a transaction on the home screen now opens the
transaction detail view instead of navigating to the address
detail view.
2026-02-27 12:54:42 +07:00
sneak 55786d1350 Exclude contract calls from dust transaction filter
check / check (push) Successful in 18s
The dust filter was hiding contract interactions (approve, transfer,
etc.) because they have 0 ETH value, which falls below the dust
threshold. Contract calls with 0 ETH are normal — only plain ETH
transfers should be checked against the dust threshold.

Also captures is_contract and method from Blockscout's transaction
response for future use in transaction display.
2026-02-27 12:52:06 +07:00
sneak 54e6f6c180 Show tx status screens after dApp transaction approval
check / check (push) Successful in 17s
Previously the approval popup closed immediately after the user
entered their password, giving zero feedback about whether the
transaction was broadcast or confirmed. Now:

1. Background sends the broadcast result back to the popup via
   sendResponse callback (txHash or error)
2. Popup shows wait-tx screen on success (with polling timer)
   or error-tx screen on failure
3. Wait-tx polls for confirmation and transitions to success-tx
4. Done button closes the approval window

txStatus.init() moved before the approval early-return so the
wait/success/error views are wired up in the approval popup.
Done buttons detect the approval context and call window.close()
instead of navigating to address detail.
2026-02-27 12:50:24 +07:00
sneak 1ebc206201 Replace old 150-token list with 511-token tokenList.js
check / check (push) Successful in 14s
Delete src/shared/tokens.js and migrate all consumers to
src/shared/tokenList.js which has 511 tokens (vs ~150) sourced
from CoinGecko with on-chain verified decimals.

- prices.js: getTopTokenPrices now from tokenList
- transactions.js: KNOWN_SYMBOLS now from tokenList (3.4x more
  symbols for spoof detection)
- send.js: KNOWN_SYMBOLS for token dropdown filtering
- approval.js: uses pre-built TOKEN_BY_ADDRESS map instead of
  constructing its own from TOKENS array
- addToken.js: uses getTopTokens(25) for quick-pick buttons
  (only top 25 shown, not all 511)
2026-02-27 12:39:41 +07:00
sneak e7711274b3 Add tokenList.js with 511 ERC-20 tokens ranked by market cap
check / check (push) Successful in 13s
New module with top Ethereum mainnet ERC-20 tokens sourced from
CoinGecko API (market cap ranking) with decimals verified on-chain
via eth_call to each contract. Addresses are EIP-55 checksummed.

Exports:
- TOKENS: full array ordered by market cap
- TOKEN_BY_ADDRESS: Map of lowercase address -> token info
- KNOWN_SYMBOLS: Map of uppercase symbol -> legitimate address
- getTopTokens(n): return first n tokens

This module is not yet integrated into the existing token.js — it
exists alongside it for now as a data source ready for integration.
2026-02-27 12:37:01 +07:00
sneak a9935eca8d Decode ERC-20 calldata in transaction approval popup
check / check (push) Successful in 15s
The tx approval screen now decodes known ERC-20 function calls
(approve, transfer) and shows them in plain language instead of
raw hex. For the Uniswap approve example, the user now sees:

  Action: Token Approval
  Approve spending of your USDT
  Token: USDT (with full contract address + etherscan link)
  Spender: (full address + etherscan link)
  Amount: Unlimited

Known tokens from the built-in list show their symbol. Unknown
tokens show the contract address. Max uint256 approvals are
labeled "Unlimited". The raw data is still shown below in a
scrollable area for verification.

Also labels the "To" field as "Contract" since dApp transactions
are always contract calls, and shows the token symbol above the
contract address when recognized.
2026-02-27 12:33:09 +07:00
sneak d29273114b Fix ERC-20 transfers showing as 0 ETH due to dedup bug
check / check (push) Successful in 14s
When sending an ERC-20 token, Blockscout returns the same tx hash
from both the /transactions endpoint (as a 0 ETH contract call) and
the /token-transfers endpoint (as the actual token transfer with
amount and symbol). The old dedup logic kept the 0 ETH version and
skipped the token transfer.

Now token transfers replace normal transactions with the same hash,
since the token transfer has the real amount, symbol, and contract
address.
2026-02-27 12:29:15 +07:00
sneak 2467dfd09c Centralize view state into app ctx with viewData persistence
check / check (push) Successful in 17s
Creates a centralized transactionDetail.js view module, replacing
the duplicated showTxDetail/copyableHtml/blockieHtml/txDetailAddressHtml
code that was in both addressDetail.js and addressToken.js (~120 lines
removed). Transaction data is stored in state.viewData and persisted,
so the transaction detail view survives popup close/reopen.

Adds viewData to persisted state. Each view that needs data for
restore stores it in state.viewData before rendering. The ctx object
now has showTransactionDetail() alongside all other show methods.

Restorable views expanded to include: transaction (via viewData.tx),
success-tx (via viewData.hash/blockNumber), error-tx (via
viewData.message). txStatus.js split into show (sets data) + render
(reads data) for each screen, enabling restore.

Non-restorable views (send, confirm-tx, wait-tx, add-wallet,
import-key, add-token) fall back to the nearest parent since they
involve active form state or network polling.
2026-02-27 12:16:33 +07:00
sneak 034253077c Persist navigation state across popup close/reopen
check / check (push) Successful in 17s
The current view, selected wallet, selected address, and selected
token are now saved to extension storage. When the popup reopens,
it restores to the last visited view instead of always returning
to the home screen.

Restorable views: main, address detail, address-token, receive,
settings. Non-restorable views (send, confirm, tx status, forms)
fall back to the nearest parent. Stored indices are validated
against current wallet data to handle stale references.

Also refactors receive view setup into a centralized receive.show()
function, eliminating duplicate QR/address/warning code from
addressDetail.js, addressToken.js, and home.js. Adds settings.show()
to centralize settings field population.
2026-02-27 12:12:07 +07:00
sneak 75cbbea035 Add user-facing documentation in docs/README.md
check / check (push) Successful in 15s
Covers rationale, hard guidelines (always/never), external service
details (RPC, Blockscout, CoinDesk APIs with what data is sent),
encryption model, installation, wallet management, sending/receiving,
web3 site connections, scam protection, settings, and FAQ.

Written for a technical cryptocurrency user who is not a programmer.
2026-02-27 12:08:43 +07:00
sneak 6c3cc0c516 Update README Screen Map with all views and state transitions
check / check (push) Successful in 17s
Complete rewrite of the Screen Map section documenting all 17 views:
Welcome, Home, AddWallet, ImportKey, AddressDetail, AddressToken,
Send, ConfirmTx, WaitTx, SuccessTx, ErrorTx, Receive,
TransactionDetail, AddToken, Settings, SiteApproval, TxApproval.

Each view documents its elements (with display details like blockies,
color dots, etherscan links, formatting) and all state transitions
with their destination screens and conditions.
2026-02-27 12:07:11 +07:00
sneak d229000258 Add dedicated wait/success/error screens for transaction status
After broadcast, the user is taken to a full-screen wait view showing
the amount, recipient, tx hash (copyable + etherscan link), and a
count-up timer. The view polls every 10 seconds for confirmation.

On confirmation: navigates to success screen showing block number,
tx hash, and a Done button that returns to the address view.

On 60-second timeout or error: navigates to error screen with the
failure message, tx hash (if available), and Done button.

Replaces the previous inline confirm-status div that was crammed
onto the confirmation page.
2026-02-27 12:06:32 +07:00
sneak e58f113cda Fix display consistency across all views
check / check (push) Successful in 18s
Receive view: address now shows color dot and etherscan link,
matching every other address display in the app.

Send view "From": address now includes etherscan link alongside
the existing color dot.

Send view "What to send" (ERC-20 from token view): shows token
symbol as bold heading, then full contract address below with
color dot, copy-on-click, and etherscan link.

Approval views: tx approval From/To addresses now show color
dots and etherscan links instead of bare text. Site approval
address adds etherscan link. Tx approval value uses 4 decimal
places consistent with all other amount displays.

Home tx list: row padding changed from py-1 to py-2, matching
addressDetail and addressToken transaction lists.
2026-02-27 12:01:34 +07:00
sneak a43e8f20ea Show blockies on confirm page, put USD values inline in parentheses
check / check (push) Successful in 17s
From and To addresses now render with 48px blockie identicons,
color dots, and etherscan links — matching the transaction detail
view pattern. USD estimates for amount, balance, and network fee
are shown in parentheses after the value on the same line, not on
a separate line below.
2026-02-27 11:58:04 +07:00
sneak b85eac1e75 Enhance confirm transaction page with full verification details
check / check (push) Successful in 17s
The confirmation page now shows:
- Transaction type (Native ETH transfer vs ERC-20 token transfer)
- Full ERC-20 token contract address with etherscan link
- Token symbol throughout (not raw contract address)
- Current balance of the token being sent, with USD value
- Estimated network fee in ETH and USD (fetched async)
- USD value for ERC-20 token amounts (not just ETH)
- Insufficient balance errors for ERC-20 tokens

Also implements actual ERC-20 token transfers via the token contract's
transfer() function, rather than only supporting native ETH sends.
2026-02-27 11:42:42 +07:00
sneak 01201d54b2 Fix send balance display when sending from address-token view
check / check (push) Successful in 17s
Read token from state.selectedToken when set, falling back to the
select element. This ensures the correct token balance is shown even
when the select dropdown is hidden or its value didn't take because
the token was filtered out by renderSendTokenSelect.
2026-02-27 11:39:50 +07:00
sneak fbb0def267 Replace send token dropdown with static display when token is locked
check / check (push) Successful in 17s
When sending from the address-token view, show the token symbol as
plain text instead of a disabled dropdown. ERC-20 tokens include an
etherscan link to the contract address. The dropdown is restored when
navigating back or entering send from other views.
2026-02-27 11:38:42 +07:00
sneak a1b181a471 Move ERC-20 warning from address-token view to receive/QR view
check / check (push) Successful in 17s
The warning about only sending ERC-20 tokens on the Ethereum network
belongs on the receive page where the QR code is shown, not on the
token detail view. Non-token receive flows hide the warning.
2026-02-27 11:37:18 +07:00
sneak 21fe854fa4 Add address-token detail view for per-token transaction filtering
check / check (push) Successful in 17s
Clicking a token balance on the address detail view navigates to a
focused view showing only that token's transactions. Send pre-selects
and locks the token dropdown, Receive shows an ERC-20 warning for
non-ETH tokens, and all back buttons return to the correct parent view.
2026-02-27 11:26:59 +07:00
sneak a5b2470dba Implement eth_sendTransaction for dApp-initiated transactions
check / check (push) Successful in 17s
Show a confirmation popup with tx details (from, to, value, data) and
password prompt when a dApp calls eth_sendTransaction. Sign and broadcast
the transaction in the background, returning the tx hash to the dApp.
2026-02-26 18:39:09 +07:00
sneak c131b89732 Fix spacing inconsistencies on home screen
check / check (push) Successful in 16s
- Remove mb-1 from Recent Transactions header (wallet headers have
  no bottom margin, so this should match)
- Remove mb-3 wrapper from wallet sections (section header bg
  provides the visual break, extra margin created uneven gaps)
- Change tx row padding from py-2 to py-1 to match address rows
2026-02-26 17:11:27 +07:00
sneak 44a078eaac Add visual spacer between recent transactions and add wallet link
check / check (push) Waiting to run
2026-02-26 17:02:39 +07:00
sneak 59eb02a022 Darker section header background to visually delimit sections
check / check (push) Successful in 15s
Add --color-section (#dddddd) distinct from --color-well (#f5f5f5).
Section headers on the home screen use bg-section so they stand out
as visual dividers rather than blending with the price well.
2026-02-26 16:53:10 +07:00
sneak 24f04e509a Use wallet name in titles, replace hr dividers with grey stripe headers
check / check (push) Successful in 12s
Address titles now use wallet name instead of wallet index (e.g.
"Wallet 1 — Address 2" instead of "Address 1.2"). This applies to
the address detail page title, the home address labels, and the
addressTitle() helper used on confirmation pages.

Section dividers on the home screen are now full-width grey
background stripes instead of horizontal rules, visually breaking
the page into wallet sections and a recent transactions section.
2026-02-26 16:49:52 +07:00
sneak 01048a1c3d Consistent headings on home: lighter title rules, thick section dividers
check / check (push) Successful in 17s
Wallet and Recent Transactions headings now use border-border-light
for their bottom rule. Thick 2px black horizontal rules separate
wallet sections from each other and from the transactions section,
with generous vertical spacing.
2026-02-26 16:44:57 +07:00
sneak e5ffbb4634 Show 25 most recent transactions from all addresses on home screen
check / check (push) Successful in 15s
Fetch transactions for every address across all wallets in parallel,
merge and deduplicate by hash, apply anti-poisoning filters, sort by
block number, and display the top 25 below the wallet list. Clicking
a transaction navigates to the address detail page for the relevant
address. Shows "Loading..." placeholder to prevent layout shift.
2026-02-26 16:41:15 +07:00
sneak 4c04dc4878 Add breathing room to transaction detail section headings
check / check (push) Successful in 15s
Increase section spacing from mb-3 to mb-4, add mb-1 gap between
each heading label and its content.
2026-02-26 16:37:41 +07:00
sneak db5e968b1d Make tx detail blockies 48px to match address detail page
check / check (push) Successful in 14s
Display consistency: blockies must be the same size everywhere.
2026-02-26 16:36:00 +07:00
sneak f69ce7f9d2 Restore color dots, add blockies above addresses on tx detail page
check / check (push) Successful in 14s
Blockies now appear above the from/to addresses on a separate line,
with color dots restored inline next to the address text. Increased
spacing between transaction detail fields from mb-2 to mb-3.
2026-02-26 16:33:42 +07:00
sneak 156e77b5cf Show blockie identicons on transaction detail page
check / check (push) Successful in 16s
Replace color dots with 16px circular blockies next to from and to
addresses on the transaction detail view.
2026-02-26 16:31:36 +07:00
sneak 6ba9b2c057 Right-align address USD total to match token balance values
check / check (push) Successful in 17s
2026-02-26 16:30:42 +07:00
sneak a01161c3a3 Make blockie identicon circular with more breathing room
check / check (push) Successful in 14s
2026-02-26 16:29:47 +07:00
sneak b1b8807060 Add Etherscan-style blockie identicon to address detail page
check / check (push) Successful in 27s
Show a 48px pixelated blockie (same style as Etherscan) centered
above the wallet title on the address detail page. Uses
ethereum-blockies-base64 which generates a base64 PNG from the
address. Replaces the previously added @metamask/jazzicon.
2026-02-26 16:27:47 +07:00
sneak 7dd688f571 Remove padding from [info] button to prevent address wrapping
check / check (push) Has been cancelled
2026-02-26 16:18:01 +07:00
sneak d9df8a05a5 Fix [info] button border not rendering
check / check (push) Has been cancelled
px-0.5 was not being generated by Tailwind since it only appeared in
JS, not in scanned HTML. Use inline padding instead.
2026-02-26 16:16:03 +07:00
sneak 150a1a1a34 Clear scanning flash when address scan completes
check / check (push) Has been cancelled
The "Scanning for addresses..." flash had a 30-second timeout and was
never cleared on completion. Now shows "Found N addresses." when
multiple are found, or briefly shows "Ready." for single-address
wallets.
2026-02-26 16:12:35 +07:00
sneak 6056699ac1 Toggle settings gear to go back when already on settings page
check / check (push) Has been cancelled
2026-02-26 16:10:04 +07:00
sneak 73b592af35 Restore [info] button border and hover with tighter padding
check / check (push) Has been cancelled
2026-02-26 16:08:58 +07:00
sneak 7c97eb55e5 Add "Add additional wallet..." link at bottom of main view
check / check (push) Has been cancelled
2026-02-26 16:07:53 +07:00
sneak e1c3fd8056 Shrink info button to prevent address line wrapping
check / check (push) Has been cancelled
Remove border and padding from the info button, use dashed underline
text style instead. This saves enough horizontal space that the full
address no longer wraps.
2026-02-26 16:06:14 +07:00
sneak fb89f5d27b Fix layout shift from ETH price well and Total subtitle
check / check (push) Has been cancelled
Both elements now have min-height and placeholder content so they
reserve vertical space before API data arrives, preventing layout
jumps when prices load. This follows the No Layout Shift policy
in the README.
2026-02-26 16:05:32 +07:00
sneak 72cf4aab8c Swap address row click behavior: row selects active, [info] opens detail
check / check (push) Has been cancelled
Clicking an address row now makes it the active address (bold title,
updates headline and active address display, broadcasts to dapps).
The [info] button on each row opens the address detail page. This
replaces the previous [ ]/ACTIVE toggle.
2026-02-26 16:04:23 +07:00
sneak 881217b16c Change ETH price label to "$x,xxx.xx USD/ETH"
check / check (push) Has been cancelled
2026-02-26 16:01:26 +07:00
sneak 938861c12e Move USD total to its own line and add etherscan link on address page
check / check (push) Has been cancelled
The address now sits on its own line with no other elements beside it,
followed by an etherscan external link icon. The USD total value moves
to a separate line below.
2026-02-26 16:00:50 +07:00
sneak 49dfd79d73 Show ETH price, split headline into ETH balance and total USD
check / check (push) Has been cancelled
Headline shows active address ETH balance with ETH-only USD value
in parentheses. Small "Total:" subtitle below includes ETH + token
values. A centered well between Send/Receive buttons and the wallet
list displays the current ETH price in USD.
2026-02-26 15:58:39 +07:00
sneak ba54f412d2 Show active address ETH balance and USD value in headline
check / check (push) Has been cancelled
The headline now shows the active address's balance as
"x.yyyy ETH ($z.aa USD)" instead of the sum across all wallets.
2026-02-26 15:56:09 +07:00
sneak e8e5edf5f2 Make active address display copyable with etherscan link
check / check (push) Has been cancelled
Click the active address above Send/Receive to copy it. A small
box-arrow icon links to the address on etherscan.
2026-02-26 15:53:56 +07:00
sneak fce907df55 Use compact [ ] select button and show active address above actions
check / check (push) Has been cancelled
Replace [select] with [ ] to avoid wrapping the full address line.
ACTIVE label stays as-is for discoverability. Show the currently
active address (full, untruncated, with color dot) above the Send
and Receive buttons on the home screen.
2026-02-26 15:51:56 +07:00
sneak fced156e3e Rearrange home address layout and widen rename input
check / check (push) Has been cancelled
Each address now shows: title on its own line, full untruncated
address with ACTIVE/select marker on the next line, USD total
right-aligned on the next line, then token balances below. The
wallet rename input now fills the available width.
2026-02-26 15:48:09 +07:00
sneak 5d1873ac78 Allow renaming wallets by clicking the wallet name
check / check (push) Has been cancelled
Click the wallet name on the home screen to edit it inline. The name
turns into a text input; press Enter or click away to save, Escape
to cancel. The dashed underline on the name indicates it is editable.
2026-02-26 15:44:17 +07:00
sneak d24c10ca9c Debug-log every API request and response
check / check (push) Has been cancelled
Add debugFetch wrapper in log.js that logs method, URL, and body on
request, and status code on response. Replace all fetch() calls
across balances, transactions, tokens, background RPC proxy, and
settings validation with debugFetch.
2026-02-26 15:40:09 +07:00
sneak 47e690f466 Show tracked tokens with zero balance on main and address pages
check / check (push) Has been cancelled
Add showZeroBalanceTokens setting (default: on). When enabled,
balanceLinesForAddress merges state.trackedTokens with the address's
tokenBalances, showing 0.0000 lines for tracked tokens that have no
balance on that address. This gives users visibility into all tokens
they're watching across all addresses.
2026-02-26 15:37:39 +07:00
sneak 6c4b2753d9 Add copy-on-click and etherscan links to transaction detail page
check / check (push) Has been cancelled
From address, to address, and tx hash are now clickable to copy.
Each also has a small box-arrow icon linking to the corresponding
etherscan page. ENS names and full addresses are both copyable.
2026-02-26 15:34:28 +07:00
sneak 69311f4444 Improve spam protection settings spacing and input type
check / check (push) Has been cancelled
Add more vertical spacing between checkboxes in the Token Spam
Protection well. Change the gwei threshold from a number input
(with spinner arrows) to a plain text input with numeric keyboard
hint.
2026-02-26 15:31:59 +07:00
sneak 9a6d1f6255 Add dust transaction filter to catch native ETH poisoning
check / check (push) Has been cancelled
Address poisoning attacks also use real native ETH dust transfers
(e.g. 1 gwei) from look-alike addresses. Token-level filters cannot
catch these. Add a configurable dust threshold (default 100,000 gwei
/ 0.0001 ETH) that hides transactions below the threshold from
history. The threshold is editable in Settings and the filter can be
disabled entirely. Document the specific attack tx in the README.
2026-02-26 15:29:48 +07:00
sneak b5b4f75968 Add anti-poisoning filters for token transfers and send view
check / check (push) Has been cancelled
Three layers of defense against address poisoning attacks:

1. Known symbol verification: tokens claiming a symbol from the
   hardcoded top-250 list (e.g. "ETH", "USDT") but from an
   unrecognized contract are identified as spoofs and always hidden.
   Their contract addresses are auto-added to the fraud blocklist.

2. Low-holder filtering: tokens with <1000 holders are hidden from
   both transaction history and the send token selector. Controlled
   by the "Hide tokens with fewer than 1,000 holders" setting.

3. Fraud contract blocklist: a persistent local list of detected
   fraud contract addresses. Transactions involving these contracts
   are hidden. Controlled by the "Hide transactions from detected
   fraud contracts" setting.

Both settings default to on and can be disabled in Settings.
Fetching and filtering are separated: fetchRecentTransactions returns
raw data, filterTransactions is a pure function applying heuristics.
Token holder counts are now passed through from the Blockscout API.
2026-02-26 15:22:11 +07:00
sneak d05de16e9c Document address poisoning attack and AutistMask defenses in README
check / check (push) Has been cancelled
Detail the specific attack observed against our test address: a fake
ERC-20 contract emitting spoofed Transfer events to plant a look-alike
scam address in transaction history. Document all planned defenses:
known token symbol verification, low-holder filtering, fraud contract
blocklist, send-side filtering, and the principle that all filters are
user-configurable.
2026-02-26 13:57:24 +07:00
sneak df95522f48 Disable send button after broadcast, show tx link and elapsed timer
check / check (push) Has been cancelled
Once a transaction is successfully broadcast: disable the send button
to prevent double-sends, immediately show an etherscan link for the
pending tx, and display a live elapsed-time counter that updates every
second until confirmation arrives.
2026-02-26 12:43:11 +07:00
sneak 2aebf3ddf9 Show full address without truncation on address detail page
check / check (push) Has been cancelled
2026-02-26 12:40:57 +07:00
sneak 4bfcf17773 Show address titles on transaction confirmation page
check / check (push) Has been cancelled
Add addressTitle() helper that looks up an address across all wallets
and returns its title (e.g. "Address 1.2"). The confirm page now shows
titles for both sender and receiver when they belong to our wallet.
formatAddressHtml gains an optional title parameter shown above the
full address, alongside any ENS name.
2026-02-26 12:38:34 +07:00
sneak a590cfc3ad Show approval in browser-action popup instead of a separate window
check / check (push) Has been cancelled
Use action.openPopup() to show the approval in the toolbar popup,
which is anchored to the browser window and cannot trigger a macOS
Space switch. Falls back to a separate window if openPopup() is
unavailable. A port connection detects when the popup is dismissed
without a response, and the popup URL is reset to the main UI after
every approval resolution.
2026-02-26 12:16:41 +07:00
sneak dce3b4aa08 Center approval popup over focused window to avoid macOS Space switch
check / check (push) Failing after 3h10m55s
Use getLastFocused to find the current Chrome window and position the
approval popup centered over it. This keeps the popup on the same
macOS virtual desktop instead of switching Spaces.
2026-02-26 04:03:45 +07:00
sneak dce561464d Flush pending approval popups on address switch
check / check (push) Failing after 13s
When switching addresses, reject and close any open approval popup
windows so their promises don't hang forever. Without this, stale
pending approvals from automatic dapp reconnection attempts block
future connection requests.
2026-02-26 04:02:33 +07:00
sneak e847f27243 Clear in-memory site approvals on address switch
check / check (push) Has been cancelled
Non-remembered approvals should not survive switching to a different
address and back. Wipe connectedSites when broadcasting
accountsChanged so temporary approvals require re-prompting.
2026-02-26 03:59:21 +07:00
sneak be347155e8 Check per-address permissions before broadcasting accountsChanged
check / check (push) Has been cancelled
When the active address changes, each tab now receives either the new
address (if permitted) or an empty array (if not). This prevents dapps
from seeing an address they have no permission for, which caused them
to break.
2026-02-26 03:57:23 +07:00
sneak 980fdda694 Scope site connection permissions per address
check / check (push) Has been cancelled
allowedSites and deniedSites are now objects keyed by address instead
of flat arrays, so approving a site for one address no longer grants
access for all addresses. Old flat-array data is discarded on load.
Settings view collects unique hostnames across all addresses and
deleting removes the site from every address.
2026-02-26 03:54:52 +07:00
sneak 21ccecab46 Fix approval popup: init listeners before early return, rename view, space buttons
check / check (push) Has been cancelled
The Allow/Deny buttons did nothing because approval.init(ctx) was
called after the early return for approval mode, so listeners were
never attached. Move it before the check.

Rename view from "approve" to "approve-site" to avoid ambiguity with
future transaction approval. Space Allow and Deny buttons apart with
justify-between to prevent misclicks.
2026-02-26 03:51:51 +07:00
sneak 2d328c7389 Fix from address not showing when Send clicked from main view
check / check (push) Has been cancelled
Move renderSendTokenSelect to send.js so both the main view and
address detail view call it before navigating to send. Without it,
the token dropdown was stale and updateSendBalance had no context.
2026-02-26 03:49:20 +07:00
sneak 4ea5eeabda Show sending address on send page with color dot and ENS name
check / check (push) Has been cancelled
2026-02-26 03:47:48 +07:00
sneak b8126c6080 Add Send and Receive buttons to main view using active address
check / check (push) Has been cancelled
2026-02-26 03:47:04 +07:00
sneak 0d543288b2 Parallelize address scanning and unify address display formatting
check / check (push) Has been cancelled
Scanning: check all gap-limit addresses in parallel per batch instead
of sequentially. For a wallet with 1 used address this reduces from
12 sequential RPC round-trips to 1 parallel batch + 1 small follow-up.

Display: add shared formatAddressHtml(address, ensName, maxLen) and
escapeHtml() to helpers.js. Use them in confirm-tx (was missing color
dot entirely) and approval view. Remove duplicate escapeHtml from
addressDetail.js.
2026-02-26 03:46:25 +07:00
sneak 1dfc006cb9 Fix [select] inheriting bold from parent flex container
check / check (push) Has been cancelled
2026-02-26 03:44:45 +07:00
sneak 0643307824 Style [select] indicator as bracket-wrapped with dashed underline
check / check (push) Has been cancelled
2026-02-26 03:41:43 +07:00
sneak 56fa56bc8a Add site connection permissions, approval flow, and active address
check / check (push) Has been cancelled
- Add activeAddress, allowedSites, deniedSites, rememberSiteChoice to
  persisted state
- Replace auto-connect with permission checks: allowed sites connect
  automatically, denied sites are rejected, unknown sites trigger an
  approval popup
- Add approval popup UI with hostname display, active address preview,
  remember checkbox, and allow/deny buttons
- Add ACTIVE/[select] indicator on address rows in the main view to
  set the active web3 address
- Add allowed/denied site list management in settings with delete buttons
- Broadcast accountsChanged to connected dapps when active address changes
- Handle approval window close as implicit denial
2026-02-26 03:40:34 +07:00
sneak 9a6e544167 Truncate address to 40 chars on address detail pane for dot alignment
check / check (push) Has been cancelled
2026-02-26 03:31:13 +07:00
sneak 0f03ba7cd8 Link tx hash, from, and to addresses to Etherscan in transaction detail view
check / check (push) Has been cancelled
2026-02-26 03:29:42 +07:00
sneak 166bb46149 Truncate addresses by 2 chars to compensate for color dot width
check / check (push) Has been cancelled
Move truncateMiddle to helpers.js for reuse. Shorten displayed addresses
by 2 characters wherever a dot is shown: home view (40 char max), tx list
(maxAddr - 2), and address detail container (40ch width).
2026-02-26 03:29:09 +07:00
sneak 138468287c Fix address color palette to use equally saturated colors
check / check (push) Has been cancelled
Replace mixed-saturation palette with 16 hues evenly spaced at 22.5°
intervals, all at HSL(h, 70%, 50%) for uniform vibrancy.
2026-02-26 03:27:48 +07:00
sneak d28d5a5a51 Add address color dots and cached ENS reverse lookups
check / check (push) Has been cancelled
Deterministic colored dots derived from address bytes (16-color palette)
displayed before every address. ENS reverse resolution for transaction
counterparties with 12-hour localStorage cache.
2026-02-26 03:26:52 +07:00
sneak fbff44ade6 Fix tx amount display to 4 decimal places, add relative time to tx detail
check / check (push) Has been cancelled
- Transaction values now use exactly 4 decimal places (was 6),
  matching balance display everywhere else
- Transaction detail view shows "2026-02-25 15:04:23 (23 days ago)"
  instead of just the ISO date
- Added Display Consistency policy to README
2026-02-26 03:19:42 +07:00
sneak a1ddbd035b Fix balance line spacing: use width:42ch;max-width:100%
check / check (push) Has been cancelled
2026-02-26 03:17:08 +07:00
sneak e1bd3bab58 Increase right padding to pr-5 (20px) for scrollbar gutter
check / check (push) Has been cancelled
2026-02-26 03:15:32 +07:00
sneak 4765bf835f Add right padding on #app for overlay scrollbar gutter
check / check (push) Has been cancelled
2026-02-26 03:14:39 +07:00
sneak ff3554e24e Widen popup body to 412px to account for scrollbar width
check / check (push) Has been cancelled
2026-02-26 03:13:31 +07:00
sneak 75ec67617b Rewrite tx list with innerHTML, fix scrollbar overlay and overflow
check / check (push) Has been cancelled
- Rebuilt tx list rendering using innerHTML instead of createElement
- scrollbar-gutter: stable on body to prevent content shift
- max-width:42ch instead of width:42ch to prevent horizontal overflow
- overflow-x:hidden on body and #app
2026-02-26 03:12:33 +07:00
sneak 197f40bde5 Use inline styles for tx list items to fix overflow
check / check (push) Has been cancelled
2026-02-26 02:33:42 +07:00
sneak be08723851 Fix tx list overflow: add min-w-0 to truncatable flex children
check / check (push) Has been cancelled
2026-02-26 02:32:04 +07:00
sneak d0cca13715 Fix tx list overflow: use truncate on left spans, shrink-0+pl-2 on right
check / check (push) Successful in 13s
Left-side spans (age, address) get tailwind truncate class so they
can't push the row wider than its container. Right-side spans (direction,
amount) get shrink-0 so they keep their full text. Also added
overflow-hidden on #tx-list container.
2026-02-26 02:30:32 +07:00
sneak cef3d2ad37 Fix horizontal overflow: overflow-x-hidden on body and app, remove shrink-0 from 42ch spans
check / check (push) Successful in 13s
The 42ch fixed-width spans with shrink-0 prevented flex from shrinking
them when the container was narrower, causing horizontal scrolling.
Also added overflow-x: hidden on body and #app as a safety net.
2026-02-26 02:29:11 +07:00