1 Commits
Author SHA1 Message Date
sneak 7b731ea261 fix: sign and export with each address's own derivation index (closes #510)
check / check (push) Successful in 5m11s
e2e / e2e-chrome (push) Successful in 4m50s
e2e / e2e-firefox (push) Successful in 2m15s
Sending, site transactions, site signatures and private key export
derived the key at the address's position in the wallet's list. After
an import whose scan passed over an unused index, or after removing an
address that was not the last, that position named another address's
key.

Each HD and xprv address record now stores the index it was derived at
(at wallet creation, by the import scan, by "+"), and
getSignerForAddress() derives at that index and refuses any key whose
address differs from the record's. The export screen reports that
refusal instead of calling the password wrong.

Model: opus-5-5
2026-10-14 03:09:03 +00:00
4 changed files with 12 additions and 39 deletions
+4 -3
View File
@@ -2,9 +2,10 @@
- `git pull` `next` and cut a branch from it — one branch per issue, named - `git pull` `next` and cut a branch from it — one branch per issue, named
`issue-<N>-<slug>`. Never branch from `main`. `issue-<N>-<slug>`. Never branch from `main`.
- Do the work as one commit whose title ends with ` (closes #N)`. - Do the work as one commit whose title ends with ` (closes #N)`, with the
- Add no entry to Completed Steps. What landed is recorded on the tracker and in `TODO.md` update in that same commit.
`git log`, where each commit title names the issue it closes. - Move Next Step to the top of Completed Steps; move the top item of Future
Steps into Next Step.
- Run `make fmt`, then `make check`. A feature branch may be red; `next` and - Run `make fmt`, then `make check`. A feature branch may be red; `next` and
`main` may not. `main` may not.
- Rebase onto current `next` immediately before pushing — other branches land on - Rebase onto current `next` immediately before pushing — other branches land on
+8 -12
View File
@@ -7,10 +7,9 @@
<link rel="stylesheet" href="styles.css" /> <link rel="stylesheet" href="styles.css" />
</head> </head>
<!-- Chrome gives extension pages a stylesheet of its own that sets the <!-- Chrome gives extension pages a stylesheet of its own that sets the
font and its size on body, and a Tailwind class beats it only when font on body, and a Tailwind class beats it only when marked
marked important: hence font-mono! and text-sm! rather than important: hence font-mono! rather than font-mono. -->
font-mono and text-sm. --> <body class="bg-bg text-fg font-mono! text-sm">
<body class="bg-bg text-fg font-mono! text-sm!">
<div id="app" class="p-2 pr-5 overflow-x-hidden"> <div id="app" class="p-2 pr-5 overflow-x-hidden">
<!-- ============ GLOBAL TITLE BAR ============ --> <!-- ============ GLOBAL TITLE BAR ============ -->
<div <div
@@ -88,14 +87,11 @@
<!-- Mnemonic form section --> <!-- Mnemonic form section -->
<div id="add-wallet-section-mnemonic"> <div id="add-wallet-section-mnemonic">
<!-- The die button shares the instruction's row: on a row <p class="mb-2">
of its own it pushes Import below the fold at Enter your 12 or 24 word recovery phrase below, or click
360x600. --> the button to roll the die for a new one.
<div class="mb-2 flex justify-between items-start gap-2"> </p>
<p> <div class="mb-1 flex justify-end">
Enter your 12 or 24 word recovery phrase below, or
click the button to roll the die for a new one.
</p>
<button <button
id="btn-generate-phrase" id="btn-generate-phrase"
class="border border-border px-2 py-1 hover:bg-fg hover:text-bg cursor-pointer text-xs" class="border border-border px-2 py-1 hover:bg-fg hover:text-bg cursor-pointer text-xs"
-12
View File
@@ -128,18 +128,6 @@ step("the popup is drawn in the monospace font it declares", async (env) => {
); );
}); });
// The same check as the Chrome suite's (#456), so both browsers are held to
// the same size.
step("the popup's text is drawn at the 14px text-sm declares", async (env) => {
const size = await env.driver.execute(
"return getComputedStyle(document.body).fontSize;",
);
assert(
size === "14px",
"the popup's text is drawn at " + size + ", not at the 14px of text-sm",
);
});
// The recovery screen (#361): the Chrome suite's four cases, run before any // The recovery screen (#361): the Chrome suite's four cases, run before any
// wallet exists for the same reason. With no wallet nothing saves on a timer, // wallet exists for the same reason. With no wallet nothing saves on a timer,
// so no save can write a good record over the unreadable one. The last of them // so no save can write a good record over the unreadable one. The last of them
-12
View File
@@ -113,18 +113,6 @@ test("the popup is drawn in the monospace font it declares (#418)", async (env)
); );
}); });
// The same stylesheet sets the size on body to 75%, which would draw the
// popup at 12px.
test("the popup's text is drawn at the 14px text-sm declares (#456)", async (env) => {
const size = await env.page.evaluate(
() => getComputedStyle(document.body).fontSize,
);
assert(
size === "14px",
"the popup's text is drawn at " + size + ", not at the 14px of text-sm",
);
});
// The empirical half of #182. The manifest change is only a claim about // The empirical half of #182. The manifest change is only a claim about
// what the CSP permits; this is the observation. Two things have to hold // what the CSP permits; this is the observation. Two things have to hold
// together, and the run covers both: the popup realm compiles WASM (here), // together, and the run covers both: the popup realm compiles WASM (here),