Skip to content

feat(proto): upgrade price.proto float to double for multi-currency precision#366

Closed
onchito-walks wants to merge 1 commit into
lnflash:mainfrom
onchito-walks:clean-proto-float-double
Closed

feat(proto): upgrade price.proto float to double for multi-currency precision#366
onchito-walks wants to merge 1 commit into
lnflash:mainfrom
onchito-walks:clean-proto-float-double

Conversation

@onchito-walks
Copy link
Copy Markdown

Change: PriceResponse.pricefloatdouble in price.proto

Why: 32-bit float (~7 significant digits) silently truncates exchange rates for JMD and other non-USD fiat currencies that need more precision.

Impact: Protobuf handles float→double conversion transparently. Existing servers that send float are decoded as double with zero precision loss. The price server can be updated independently.

Verification: yarn tsc-check — protobuf wire format change only.

1 file changed, 1 insertion, 1 deletion. Wire-compatible.

…recision

Changes PriceResponse.price from float (32-bit, ~7 sig figs) to double
(64-bit, ~15 sig figs) to avoid silent truncation of JMD and other
non-USD fiat exchange rates that need >7 significant digits.

Wire-compatible: protobuf handles float->double conversion transparently.
@islandbitcoin
Copy link
Copy Markdown
Contributor

bounties are closed, please join our discord server if you would like to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants