Repository navigation
Fix: Support currency format in transaction amount validation - #20399
Conversation
- style: apply linter fixes - fix: improve amount validation to handle different currency formats - Initial commit
|
Thank you for your contribution! 🎉 🔔 @gogocharli @omarshahine you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. Due to our current reduced availability during summer, the initial review may take up to 10-15 business days. |
There was a problem hiding this comment.
PR Summary
Updates transaction amount validation in RAYNAB extension to properly handle international currency formats, fixing input validation for non-US formats like European '1.234,56'.
- Fixed form validation in
extensions/raynab/src/components/transactions/transactionCreateForm.tsxto normalize currency inputs based on budget settings before validation - Added graceful handling for null/undefined currency settings while maintaining backward compatibility
- Code reuses existing
formatToYnabAmountlogic for consistent currency handling across the extension
2 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile
|
Hey @damian-duchnowski, nice work! @gogocharli, fancy checking this? |
gogocharli
left a comment
There was a problem hiding this comment.
Thank you for debugging and fixing this, @damian-duchnowski! It's working great ✅
|
Hey @andreaselia! When you have a moment, could you please approve it? Thank you! |
|
Hey @damian-duchnowski 👋 Sorry for the delay, this LGTM, thanks for your contribution mate! |
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
Problem
Users with non-US currency formats (e.g., European "1.234,56" vs US "1,234.56") were unable to enter amounts in the Add Transaction form due to validation errors. The form validation was using
Number(value)directly without accounting for different currency separator configurations from YNAB.Solution
Updated the amount validation in
transactionCreateForm.tsxto normalize the input based on the budget's currency format settings, using the same logic as the existingformatToYnabAmountfunction:Changes Made
src/components/transactions/transactionCreateForm.tsxBenefits
formatToYnabAmountTesting
The fix ensures that:
Related Issues
Closes #20369
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder