Commit b89bea1
Stop daemon broadcast events from rejecting pending wallet_ui requests (#3012)
The main-process sendCommand socket registers as service wallet_ui, so
the daemon forwards every broadcast event to it (farming_info,
get_fee_estimate, get_connections, ...). Its message handler parsed
each frame with json-bigint's useNativeBigInt parser before checking
request_id, and that parser passes any number literal longer than 15
characters to BigInt() even when it contains a decimal point. A
harvester farming_info lookup time such as 1.7656183690123726 therefore
threw "Cannot convert 1.7656183690123726 to a BigInt", and the catch
block rejected whichever request happened to be pending.
Because get_offer_summary runs inside the take_offer confirmation flow,
any farm with slow-enough plot lookups hits this race on nearly every
offer accept: the user sees the BigInt error dialog and the offer
command is never sent to the wallet.
Parse incoming frames with the native-bigint parser first, fall back to
the BigNumber parser for frames carrying long-precision floats, and
ignore frames that are not valid JSON instead of rejecting the pending
request. Matched responses keep their existing native-bigint behavior.
Claude-Session: https://claude.ai/code/session_016jfMfuGTvCmMyL7EM92dmj
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent be3a41c commit b89bea1
2 files changed
Lines changed: 95 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
284 | 349 | | |
285 | 350 | | |
286 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
9 | 29 | | |
10 | 30 | | |
11 | 31 | | |
| |||
37 | 57 | | |
38 | 58 | | |
39 | 59 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
45 | 64 | | |
| 65 | + | |
46 | 66 | | |
47 | 67 | | |
48 | 68 | | |
| |||
167 | 187 | | |
168 | 188 | | |
169 | 189 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
175 | 194 | | |
| 195 | + | |
176 | 196 | | |
177 | 197 | | |
178 | 198 | | |
| |||
0 commit comments