Page MenuHomePhabricator

[chronik-doc] Fix JSON serialization of BigInt
ClosedPublic

Authored by Fabien on May 26 2025, 08:17.

Details

Reviewers
alitayin
Group Reviewers
Restricted Project
Commits
rABCaaa1020e6b88: [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.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable