Skip to content

Fix quote validation and improve error handling for input amount#742

Merged
ebma merged 1 commit into
stagingfrom
fix-quote-query-with-input-amount-0
Jun 30, 2025
Merged

Fix quote validation and improve error handling for input amount#742
ebma merged 1 commit into
stagingfrom
fix-quote-query-with-input-amount-0

Conversation

@ebma
Copy link
Copy Markdown
Member

@ebma ebma commented Jun 30, 2025

This pull request introduces changes to improve error handling and localization in the ramp validation and quote retrieval processes. Key updates include replacing hardcoded error messages with translatable keys, adding new translation entries, and refining input validation logic.

Error Handling and Localization Improvements:

  • Updated useRampValidation to return localized error messages by using the t function for translation (apps/frontend/src/hooks/ramp/useRampValidation.ts).
  • Modified the error field in QuoteState to store either an error message or a translation key, enabling better localization (apps/frontend/src/stores/ramp/useQuoteStore.ts).
  • Replaced hardcoded error messages with translation keys for invalid input amounts and failed quote retrieval in useQuoteStore (apps/frontend/src/stores/ramp/useQuoteStore.ts). [1] [2]

Translation Additions:

  • Added new translation entries for fetchingQuote and invalidInputAmount in English (apps/frontend/src/translations/en.json). [1] [2]
  • Added corresponding translation entries for fetchingQuote and invalidInputAmount in Portuguese (apps/frontend/src/translations/pt.json). [1] [2]

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 30, 2025

Deploy Preview for pendulum-pay ready!

Name Link
🔨 Latest commit b3e28f0
🔍 Latest deploy log https://app.netlify.com/projects/pendulum-pay/deploys/6862959ebaef5a00087561ac
😎 Deploy Preview https://deploy-preview-742--pendulum-pay.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ebma ebma requested a review from a team June 30, 2025 13:48
Copy link
Copy Markdown
Contributor

@gianfra-t gianfra-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ebma ebma merged commit a335b6d into staging Jun 30, 2025
5 checks passed
@ebma ebma deleted the fix-quote-query-with-input-amount-0 branch June 30, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants