fix: use correct delimiter on credit card zero values #1280

Merged
gariasf merged 1 commits from gariasf/fix-card-format into main 2024-10-10 22:14:06 +08:00
gariasf commented 2024-10-10 15:40:00 +08:00 (Migrated from github.com)

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
But this is not:
image

This PR resolves this issue, the credit card Minimum Payment and Annual Fee now display the correct delimiter on empty values:
image

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.

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://github.com/user-attachments/assets/8f979aff-129e-4cbb-b527-79ab71c3f1d6) But this is not: ![image](https://github.com/user-attachments/assets/0c46085e-1993-48d7-8232-cda5fc5dfed0) This PR resolves this issue, the credit card Minimum Payment and Annual Fee now display the correct delimiter on empty values: ![image](https://github.com/user-attachments/assets/0b57d4e2-7baa-401f-92e9-69db5fb5a442) 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.
zachgoll (Migrated from github.com) approved these changes 2024-10-10 22:06:12 +08:00
zachgoll (Migrated from github.com) left a comment

Looks good!

Looks good!
Sign in to join this conversation.