Commit Graph

45 Commits

Author SHA1 Message Date
user
7a7f9c5135 feat: add xprv wallet import support
Add the ability to import an existing HD wallet using an extended
private key (xprv) instead of a mnemonic phrase.

- New 'xprv' wallet type with full HD derivation and address scanning
- New importXprv view with password encryption
- Updated getSignerForAddress to handle xprv wallet type
- Added xprv link to the add-wallet view
- Allow adding derived addresses for xprv wallets

Closes #20
2026-02-28 15:33:26 -08:00
user
9de7791553 fix: reset validation state when navigating to send view
All checks were successful
check / check (push) Successful in 22s
Clear the error/warning text and disable the review button when entering
the send view from home, address detail, or address token views. This
prevents stale validation messages from persisting after leaving and
returning to the send view.
2026-02-28 12:17:52 -08:00
user
2c9a34aff6 fix: show own labelled address for swap transactions in tx lists
All checks were successful
check / check (push) Successful in 22s
For swap transactions in the transaction history list views (home and
addressDetail), display the user's own labelled wallet address instead
of the contract/counterparty address. The contract address is not useful
in the list view — users need to see which of their addresses performed
the swap.

Closes #55
2026-02-28 08:57:16 -08:00
user
bf9a483031 fix: show wallet/address titles in send, txStatus, and home tx list (closes #26, closes #27, closes #28)
All checks were successful
check / check (push) Successful in 22s
- send.js: show addressTitle() above ENS name and address in From field
- txStatus.js: show addressTitle() in To address when it's a local wallet
- home.js: show addressTitle() for counterparties in tx list when they
  are local wallet addresses
2026-02-27 14:28:20 -08:00
clawbot
76059c3674 fix: display swaps and contract calls correctly in tx history (closes #3)
- Preserve contract call metadata (direction, label, method) when token
  transfers merge with normal txs in fetchRecentTransactions
- Handle 'contract' direction in counterparty display for home and
  address detail list views
- Add decoded calldata display to transaction detail view, fetching
  raw input from Blockscout and using decodeCalldata from approval.js
- Show 'Unknown contract call' with raw hex for unrecognized calldata
- Export decodeCalldata from approval.js for reuse
2026-02-27 12:31:13 -08:00
user
2244b52f5f fix: rules audit items 1,3,6 (closes #1)
All checks were successful
check / check (push) Successful in 22s
2026-02-27 02:18:45 -08:00
6b301dee28 Resolve all README FIXMEs and enforce truncation safety
All checks were successful
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
b9250dab2e Fix layout shift from async USD prices and token balances
Reserve vertical space with min-height and   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
b64f9b56cc Show contract calls as "Approve USDT" instead of "0.0000 ETH"
All checks were successful
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
034253077c Persist navigation state across popup close/reopen
All checks were successful
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
e58f113cda Fix display consistency across all views
All checks were successful
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
fbb0def267 Replace send token dropdown with static display when token is locked
All checks were successful
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
a1b181a471 Move ERC-20 warning from address-token view to receive/QR view
All checks were successful
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
21fe854fa4 Add address-token detail view for per-token transaction filtering
All checks were successful
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
c131b89732 Fix spacing inconsistencies on home screen
All checks were successful
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
59eb02a022 Darker section header background to visually delimit sections
All checks were successful
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
24f04e509a Use wallet name in titles, replace hr dividers with grey stripe headers
All checks were successful
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
01048a1c3d Consistent headings on home: lighter title rules, thick section dividers
All checks were successful
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
e5ffbb4634 Show 25 most recent transactions from all addresses on home screen
All checks were successful
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
7dd688f571 Remove padding from [info] button to prevent address wrapping
Some checks failed
check / check (push) Has been cancelled
2026-02-26 16:18:01 +07:00
d9df8a05a5 Fix [info] button border not rendering
Some checks failed
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
73b592af35 Restore [info] button border and hover with tighter padding
Some checks failed
check / check (push) Has been cancelled
2026-02-26 16:08:58 +07:00
7c97eb55e5 Add "Add additional wallet..." link at bottom of main view
Some checks failed
check / check (push) Has been cancelled
2026-02-26 16:07:53 +07:00
e1c3fd8056 Shrink info button to prevent address line wrapping
Some checks failed
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
72cf4aab8c Swap address row click behavior: row selects active, [info] opens detail
Some checks failed
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
881217b16c Change ETH price label to "$x,xxx.xx USD/ETH"
Some checks failed
check / check (push) Has been cancelled
2026-02-26 16:01:26 +07:00
49dfd79d73 Show ETH price, split headline into ETH balance and total USD
Some checks failed
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
ba54f412d2 Show active address ETH balance and USD value in headline
Some checks failed
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
e8e5edf5f2 Make active address display copyable with etherscan link
Some checks failed
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
fce907df55 Use compact [ ] select button and show active address above actions
Some checks failed
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
fced156e3e Rearrange home address layout and widen rename input
Some checks failed
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
5d1873ac78 Allow renaming wallets by clicking the wallet name
Some checks failed
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
47e690f466 Show tracked tokens with zero balance on main and address pages
Some checks failed
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
2d328c7389 Fix from address not showing when Send clicked from main view
Some checks failed
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
b8126c6080 Add Send and Receive buttons to main view using active address
Some checks failed
check / check (push) Has been cancelled
2026-02-26 03:47:04 +07:00
1dfc006cb9 Fix [select] inheriting bold from parent flex container
Some checks failed
check / check (push) Has been cancelled
2026-02-26 03:44:45 +07:00
0643307824 Style [select] indicator as bracket-wrapped with dashed underline
Some checks failed
check / check (push) Has been cancelled
2026-02-26 03:41:43 +07:00
56fa56bc8a Add site connection permissions, approval flow, and active address
Some checks failed
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
166bb46149 Truncate addresses by 2 chars to compensate for color dot width
Some checks failed
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
d28d5a5a51 Add address color dots and cached ENS reverse lookups
Some checks failed
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
a1ddbd035b Fix balance line spacing: use width:42ch;max-width:100%
Some checks failed
check / check (push) Has been cancelled
2026-02-26 03:17:08 +07:00
75ec67617b Rewrite tx list with innerHTML, fix scrollbar overlay and overflow
Some checks failed
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
cef3d2ad37 Fix horizontal overflow: overflow-x-hidden on body and app, remove shrink-0 from 42ch spans
All checks were successful
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
3bd2b58543 Token auto-discovery, tx history, balance polling, EIP-6963, UI overhaul
All checks were successful
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
023d8441bc Split popup into one file per view
All checks were successful
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