Commit Graph
229 Commits
Author SHA1 Message Date
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 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
sneak 3eeaa7a7b2 Fix horizontal scrolling in transaction list with overflow-hidden
check / check (push) Successful in 14s
2026-02-26 02:26:43 +07:00
sneak 9c80dbccf4 Shorten truncated address by 2 more chars to prevent wrapping
check / check (push) Successful in 13s
2026-02-26 02:25:20 +07:00
sneak 7dba48b61d Shorten truncated address by 2 chars to prevent wrapping
check / check (push) Successful in 14s
2026-02-26 02:24:34 +07:00
sneak c278be65ed Refactor truncateAddress to truncateMiddle(str, maxLen)
check / check (push) Successful in 14s
Clean signature that takes a target length instead of leaking
the amount-length calculation into the function.
2026-02-26 02:23:30 +07:00
sneak 9abe570e43 Truncate counterparty address in tx list based on amount width
check / check (push) Successful in 14s
For every character beyond 10 in the amount string (e.g. "17.1900 USDT"
is 12 chars, 2 excess), remove that many characters from the middle of
the counterparty address, replaced with an ellipsis. Hover shows the
full address; clicking goes to tx detail which also shows it in full.
Prevents the address from wrapping onto a second line.
2026-02-26 02:22:38 +07:00
sneak bf9ae4919d Redesign transaction list and add transaction detail view
check / check (push) Successful in 13s
Transaction list entries are now two lines with more spacing:
- Line 1: humanized age (hover for ISO datetime) + direction (Sent/Received)
- Line 2: counterparty address + amount with symbol
- Clickable rows navigate to transaction detail view

Transaction detail view (placeholder) shows:
- Status, time, amount, from, to, transaction hash
- Back button returns to address detail

Also added "transaction" to VIEWS list in helpers.
2026-02-26 02:20:13 +07:00
sneak 3bd2b58543 Token auto-discovery, tx history, balance polling, EIP-6963, UI overhaul
check / check (push) Successful in 14s
Major changes:
- Fetch token balances and tx history from Blockscout API (configurable)
- Remove manual token discovery (discoverTokens) in favor of Blockscout
- HD address gap scanning on mnemonic import
- Duplicate mnemonic detection on wallet add
- EIP-6963 multi-wallet discovery + selectedAddress updates in inpage
- Two-tier balance refresh: 10s while popup open, 60s background
- Fix $0.00 flash before prices load (return null when no prices)
- No-layout-shift: min-height on total value element
- Aligned balance columns (42ch address width, consistent USD column)
- All errors use flash messages instead of off-screen error divs
- Settings gear in global title bar, add-wallet moved to settings pane
- Settings wells with light grey background, configurable Blockscout URL
- Consistent "< Back" buttons top-left on all views
- Address titles (Address 1.1, 1.2, etc.) on main and detail views
- Send view shows current balance of selected asset
- Clickable affordance policy added to README
- Shortened mnemonic backup warning
- Fix broken background script constant imports
2026-02-26 02:13:39 +07:00
sneak 2b2137716c Add transaction confirmation screen and password modal
check / check (push) Successful in 13s
New send flow: Send → Confirm → Password → Broadcast.

Send view: collects To (with ENS resolution), Amount, Token.
"Review" button advances to confirmation. No password field.

Confirm Transaction view: shows From, To (with ENS name),
Amount (with USD value), and runs pre-send checks:
- Scam address warning (checked against local blocklist)
- Self-send warning
- Insufficient balance error (disables Send button)

Password modal: full-screen overlay, appears only after user
clicks Send on the confirmation screen. Decrypts the wallet
secret, signs and broadcasts the transaction. Wrong password
is caught inline.

scamlist.js: hardcoded set of known scam/fraud addresses
(Tornado Cash sanctioned, drainer contracts, address
poisoning). Checked locally, no external API.
2026-02-25 18:55:42 +07:00
sneak 023d8441bc Split popup into one file per view
check / check (push) Successful in 4s
popup/index.js reduced to ~75 lines: loads state, builds a
shared context object, initializes all views, shows first screen.

Each view in popup/views/:
  helpers.js      — $(), showError, hideError, showView
  welcome.js      — welcome screen
  addWallet.js    — unified create/import recovery phrase
  importKey.js    — private key import
  home.js         — wallet list, total value, address derivation
  addressDetail.js — address view, token list, QR, copy
  send.js         — send form, ENS resolution, tx broadcast
  receive.js      — QR + copy
  addToken.js     — token lookup, common token picker
  settings.js     — RPC endpoint
  approval.js     — dApp approval (stub)

Views communicate via a ctx object with shared callbacks
(renderWalletList, showAddressDetail, doRefreshAndRender, etc).
2026-02-25 18:51:41 +07:00