fix: use correct delimiter on credit card zero values #1280
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.
After recent fixes, the credit card view displays 0 by default on Minimum Payment and Annual Fee. However, the format is wrong. On zero values, the two digits after the delimiter are the decimals, and this is the current behaviour on other sections, like the dashboard.
For example, this is correct:
![image](https://private-user-images.githubusercontent.com/5864275/375273762-8f979aff-129e-4cbb-b527-79ab71c3f1d6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzgxMTEsIm5iZiI6MTczOTE3NzgxMSwicGF0aCI6Ii81ODY0Mjc1LzM3NTI3Mzc2Mi04Zjk3OWFmZi0xMjllLTRjYmItYjUyNy03OWFiNzFjM2YxZDYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDg1NjUxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmYxMjE4YjQzMTVjMWY1ZTBhZTk1ZjQzMGVmZTA1YTNhOWEwYmRiYzkzYjc3YWU0M2Q5Yjc4NDQ3Y2QwNDMxYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.IKbs4cEUTnrPuh8JeM18WoVpYpfMAKjzpl0SqbgnDCY)
![image](https://private-user-images.githubusercontent.com/5864275/375273841-0c46085e-1993-48d7-8232-cda5fc5dfed0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzgxMTEsIm5iZiI6MTczOTE3NzgxMSwicGF0aCI6Ii81ODY0Mjc1LzM3NTI3Mzg0MS0wYzQ2MDg1ZS0xOTkzLTQ4ZDctODIzMi1jZGE1ZmM1ZGZlZDAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDg1NjUxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDM4YTAwOTdjMjdhNjE0ZmQwNzc1ZjEwYmQ1NWU1MjJlYzI0Zjk5NGJmZTc0ZjU2M2U2MWI2NWY4OTM0Yzc0YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.1Rh8RjxaCDTOCKKtrD_b28hZ3zx9uLe6yIlQ438EnIw)
But this is not:
This PR resolves this issue, the credit card Minimum Payment and Annual Fee now display the correct delimiter on empty values:
![image](https://private-user-images.githubusercontent.com/5864275/375274037-0b57d4e2-7baa-401f-92e9-69db5fb5a442.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzgxMTEsIm5iZiI6MTczOTE3NzgxMSwicGF0aCI6Ii81ODY0Mjc1LzM3NTI3NDAzNy0wYjU3ZDRlMi03YmFhLTQwMWYtOTJlOS02OWRiNWZiNWE0NDIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDg1NjUxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTQyZmViZWY1ZjM4ZjA0MTM2OWNkYjllNTg4YTgwMDMzMGQxYTRjMWI1ODMwNTdjOWY4M2JhYTkwZDc3NTc4MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.aFyrtbxvX-1OMIFxRtcR7TFC1XhVJ08PJv5j3CvjVdw)
I haven't seen any issues related to this, so I can't link one.
First time contributing and first time using ruby, I'll be happy to hear about your feedback.
Cheers.