diff options
| author | Adam Soltys <[email protected]> | 2026-08-17 11:16:25 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-17 11:16:25 -0700 |
| commit | 6a78f8fefe71e636c847e1402b08b1d60483565b (patch) | |
| tree | 4e4684c6e395fe5f00d68a089b34749f09b2c3b5 /src/app.js | |
| parent | f9b0a054f822fc6a28fafd623ac2ebd2d274334d (diff) | |
| download | coinosv3-6a78f8fefe71e636c847e1402b08b1d60483565b.tar.gz coinosv3-6a78f8fefe71e636c847e1402b08b1d60483565b.zip | |
Own entropy means owned outcome: the typed text alone derives the seed, so re-typing it is an import on any device — the warn-box says what that guarantee costs, and Regenerate bows out of a deterministic job
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -771,8 +771,8 @@ function createPane() { { class: 'col' }, h('p', { class: 'muted' }, t('genIntro')), // BYO randomness for the seed — folded away so the common path stays - // one button. Whatever is typed here is hashed together with the - // device's own randomness (see newMnemonic), never used alone. + // one button. Deterministic on purpose: the typed text alone derives + // the seed (see newMnemonic), so re-typing it IS an import. h('button', { class: 'linklike small', style: 'align-self:flex-start', onClick: () => { ui.ownEntropyOpen = !ui.ownEntropyOpen; render(); }, @@ -780,6 +780,7 @@ function createPane() { ui.ownEntropyOpen ? h('div', { class: 'col gap6' }, h('p', { class: 'small muted', style: 'margin:0' }, t('entropyHint')), + h('div', { class: 'warn-box small' }, t('entropyWarn')), h('textarea', { rows: '2', style: 'font-family:var(--sans)', placeholder: t('entropyPlaceholder'), autocapitalize: 'none', autocomplete: 'off', spellcheck: 'false', @@ -815,12 +816,14 @@ function createPane() { 'div', { class: 'row gap6' }, copyBtn(ui.draftMnemonic, t('copyPhrase')), - h( + // With own entropy the phrase is a pure function of the text — + // "Regenerate" would hand back the identical words, so it hides. + (ui.ownEntropy || '').trim() ? null : h( 'button', { class: 'btn-ghost btn-sm', onClick: () => { - ui.draftMnemonic = newMnemonic(128, (ui.ownEntropy || '').trim()); + ui.draftMnemonic = newMnemonic(); render(); }, }, |
