diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 2 | ||||
| -rw-r--r-- | src/wallet.js | 8 |
2 files changed, 8 insertions, 2 deletions
@@ -506,7 +506,7 @@ function receiveTab() { ), h('div', { class: 'path' }, `m/84'/${coin}'/0'/0/${fresh.index}`), h('p', { class: 'small muted center', style: 'margin:0' }, - 'A fresh address is shown for better privacy. After a payment arrives, scan again to advance to a new one.'), + 'A fresh address is shown for better privacy. When it receives a payment, a new one appears automatically.'), addressBook() ); } diff --git a/src/wallet.js b/src/wallet.js index 04f303a..21fbcf2 100644 --- a/src/wallet.js +++ b/src/wallet.js @@ -17,7 +17,13 @@ import { p2wpkh } from '@scure/btc-signer/payment'; import { Api, pool } from './api.js'; -const GAP_LIMIT = 20; // BIP44 standard gap limit +// The BIP44 standard gap limit is 20, but that means ~40 address lookups per +// scan. We can safely use a much smaller limit because this wallet only ever +// exposes ONE unused receive address at a time (freshReceive = first unused; +// there is no "generate another address" button). That keeps used addresses +// contiguous, so the gap between them is never more than 1 — a limit of 5 is a +// comfortable safety margin while cutting scan requests ~4x. +const GAP_LIMIT = 5; const NETS = { mainnet: { net: btc.NETWORK, coin: 0 }, |
