mirror of
https://github.com/Such-Software/smirk-backend-core.git
synced 2026-10-17 15:31:38 +02:00
XMR/WOW atomic amounts (piconero/wownoshi) can exceed 2^53, which a JavaScript number cannot hold exactly, so a large balance or output was silently rounded when the wallet JSON.parsed it. Serialize every atomic amount (balance total_received/locked/pending, spent + unspent output amounts, history totals) as a decimal string; heights, indices, counts, and fee params stay numbers. utoipa value_type=String keeps the OpenAPI honest. Tests assert the string wire contract for a 2^53+1 value.
148 KiB
148 KiB