Commit 0f59493
committed
fix: chain sync batch — testnet xpub collisions, decline/invalid handling
- Drop the cross-chain duplicate-xpub rejection: all testnets share slip 1,
so Sepolia and Amoy (both evm/p2sh with default bip32 bytes) derive
byte-identical wallet xpubs — as do Testnet and Signet Bitcoin. Any batch
containing such a pair was rejected wholesale as 'duplicate_xpub'.
Duplicate CHAIN entries remain invalid.
- Post chainsyncrejected('invalid') for malformed requests instead of
silently dropping them — the wallet otherwise waits the full 30s fallback
timeout before offering per-chain QR sync. This wires up the previously
dead 'invalid' rejection-reason arm.
- Declining a batch left batchStartedRef stuck true for the session
(suppressing every later verification code) and, on a fresh pairing,
dropped the identity verification code entirely while the wallet shows
one. Decline now shows the identity code and resets the flag.
- CHAIN_SYNC_POST_SPACING_MS 1500 → 3000: the relay sync doc is
last-write-wins per walletIdentity and the wallet polls at 1s — 1.5s left
almost no margin for network jitter on already-derived chains, and a
missed doc is never re-posted. 3s gives the poll 2-3 chances per doc and
stays far inside the wallet's 60s stall window.1 parent 86e1610 commit 0f59493
3 files changed
Lines changed: 38 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | | - | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
117 | | - | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
492 | 501 | | |
493 | 502 | | |
494 | 503 | | |
| |||
497 | 506 | | |
498 | 507 | | |
499 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
500 | 519 | | |
501 | 520 | | |
502 | 521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
| 192 | + | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
| |||
0 commit comments