Skip to content

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

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

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.
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.

1 participant