Commit 0e35201
committed
fix(wasm-utxo): use BigInt-specific conversion for unspent values
Replace BigInt::from(v).as_f64() with u64::try_from(BigInt::unchecked_from_js(v)).
unchecked_from_js treats the JsValue as a BigInt without re-wrapping it, then
try_from converts directly to u64 — no lossy f64 round-trip and no false error
when the caller correctly passes a JS bigint.
Issue: BTC-31591 parent d7c0855 commit 0e35201
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
| 424 | + | |
| 425 | + | |
428 | 426 | | |
429 | 427 | | |
430 | 428 | | |
| |||
0 commit comments