HomePhabricator

[chronik-doc] Fix JSON serialization of BigInt

Description

[chronik-doc] Fix JSON serialization of BigInt

Summary: BigInt is not json serializable, so we monkey patch the type to add this serialization. If it fits a Number, use that instead (common case) and use a string as a safe fallback if it doesn't.

Test Plan:

npm run build
npm run serve

Check the utxos are returned and displayed properly.

Reviewers: #bitcoin_abc, alitayin

Reviewed By: alitayin

Differential Revision: https://reviews.bitcoinabc.org/D18144

Details

Provenance
FabienAuthored on May 26 2025, 08:17
FabienPushed on May 26 2025, 08:30
Reviewer
alitayin
Differential Revision
D18144: [chronik-doc] Fix JSON serialization of BigInt
Parents
rABC352db1aa8987: [chronik-doc] Update to latest client version and make sure it remains up-to…
Branches
Unknown
Tags
Unknown