Skip to content

fix(exchange): round Fiat.hasDisplayableValue to currency precision#833

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/amount-below-minimum-precision
Jun 3, 2026
Merged

fix(exchange): round Fiat.hasDisplayableValue to currency precision#833
bmc08gt merged 1 commit into
code/cashfrom
fix/amount-below-minimum-precision

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

The buy-sell round-trip through the bonding curve introduces sub-quark truncation, causing 0.01 USD to fall just below smallestUnit (9987 vs 10000 quarks). Round to the currency display digits before comparing so the property matches formatted() semantics.

The buy-sell round-trip through the bonding curve introduces sub-quark
truncation, causing 0.01 USD to fall just below smallestUnit (9987 vs
10000 quarks). Round to the currency display digits before comparing
so the property matches formatted() semantics.

Also removes a debug println from RealVerifiedFiatCalculator.
@bmc08gt bmc08gt self-assigned this Jun 3, 2026
@github-actions github-actions Bot added type: fix Bug fix area: network gRPC, connectivity, API, exchange rates and removed type: fix Bug fix labels Jun 3, 2026
@bmc08gt bmc08gt added type: fix Bug fix area: payments Payments, transfers, intents, billing and removed area: network gRPC, connectivity, API, exchange rates labels Jun 3, 2026
@bmc08gt bmc08gt merged commit 31b4f2d into code/cash Jun 3, 2026
3 checks passed
@bmc08gt bmc08gt deleted the fix/amount-below-minimum-precision branch June 3, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: payments Payments, transfers, intents, billing type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant