This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Fix real_number_string_trimmed zero-decimal behavior #15873
Merged
mergify
merged 3 commits into
solana-labs:master
from
CriesofCarrots:fix-spl-token-trimmed
Mar 15, 2021
Merged
Fix real_number_string_trimmed zero-decimal behavior #15873
mergify
merged 3 commits into
solana-labs:master
from
CriesofCarrots:fix-spl-token-trimmed
Mar 15, 2021
Conversation
This file contains 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
t-nelson
approved these changes
Mar 15, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
CriesofCarrots
added
the
automerge
Merge this Pull Request automatically once CI passes
label
Mar 15, 2021
Codecov Report
@@ Coverage Diff @@
## master #15873 +/- ##
=======================================
Coverage 80.0% 80.0%
=======================================
Files 409 409
Lines 106389 106416 +27
=======================================
+ Hits 85152 85177 +25
- Misses 21237 21239 +2 |
mergify bot
pushed a commit
that referenced
this pull request
Mar 15, 2021
* Add failing test * Don't strip zeroes from zero-decimal amounts * Add zero-case test (cherry picked from commit c40bd5f)
mergify bot
pushed a commit
that referenced
this pull request
Mar 15, 2021
* Add failing test * Don't strip zeroes from zero-decimal amounts * Add zero-case test (cherry picked from commit c40bd5f)
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
real_number_string_trimmed()
(#12466) misbehaves when decimals are zero, incorrectly stripping trailing zeroes. eg:Summary of Changes
Fix; skip trailing-zero and decimal-point removal for zero-decimal amounts
Fixes #15845