Repository navigation
Directory: show the buy box for DEM amounts with trailing zeros past nine decimals - #271
Closed
randomblocker wants to merge 1 commit into
Closed
randomblocker wants to merge 1 commit into
randomblocker wants to merge 1 commit into
Conversation
…nine decimals A published price such as 1.5000000000 is exactly representable in base units, but the service page hid the buy box because it allowed at most nine decimal digits. Zeros after the ninth decimal are now accepted; a non-zero digit past the ninth decimal still hides the box. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Author
|
Closing without merging. Review found the case it handles cannot occur: a listing's fixed price must be in canonical form, so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The service page hid the buy box for a published DEM price such as
1.5000000000, because the check allowed at most nine decimal digits even though thevalue is exactly representable in base units and the SDK accepts it. The check now accepts zeros after the ninth decimal. A price with a non-zero digit
past the ninth decimal, such as
1.0000000001, still hides the box, and so does a zero amount.Tested by adding both amounts to
test/service-page.test.ts:1.5000000000shows the box and1.0000000001does not. The first assertion failed before thechange. The service page test file passes (2 of 2), the whole directory suite passes (1696 pass, 0 fail, 1 skipped) and
npm run typecheckis clean.It does not change how other listing pages, the listing API or the SDK handle amounts; only this one display check.
Closes #219
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.