Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Support for search through currency alias #12

Closed
wants to merge 2 commits into from

Conversation

Steef-Broeder
Copy link

@Steef-Broeder Steef-Broeder commented Jul 5, 2024

Uses the currency list to get all possible currencies and selects the first one that starts with what has already been typed, for both fromcurrency and tocurrency. It currently looks like this:
image

A nice addition would be to show the autocompleted currency, like this:
image
However, I do not know how to do that.

I hope this helps, please let me know what can be improved <3

@Steef-Broeder
Copy link
Author

btw, right now I'm also working on a way to automatically convert country names to currency codes which are then used.

@Steef-Broeder Steef-Broeder changed the title Incomplete fromcurrency and tocurrency autocompletes and gives a valid result Incomplete fromcurrency and tocurrency autocompletes and gives a valid result & Added support for extracting local currency from country names Jul 6, 2024
@Steef-Broeder
Copy link
Author

now country names are automatically converted to their local currency:
image

Later I will also add it so that you can see the full name of the country in the Response!

@Advaith3600
Copy link
Owner

Thank you for contributing to this feature! I appreciate your effort. I’d like to provide some feedback for changes:

  1. Feature Separation: It’s best to avoid adding multiple features in a single pull request (PR). Could you please remove the country code feature and submit it as a separate PR? This will help keep things organized.
  2. URL Flags: When making requests, use the @latest flags instead of hardcoding dates in the URL. This ensures that you always get the most up-to-date data.
  3. Build Issues: Unfortunately, I couldn’t test the code because the build is failing. From what I can see, it doesn’t seem to support normal conversions. Please review this aspect.
  4. Caching: To prevent excessive requests, consider implementing caching. Since conversion results don’t change rapidly, caching for 3 hours should suffice. You might want to create a new function to handle this logic.

@Advaith3600 Advaith3600 changed the title Incomplete fromcurrency and tocurrency autocompletes and gives a valid result & Added support for extracting local currency from country names [WIP] Support for search through currency alias Jul 7, 2024
@Advaith3600 Advaith3600 linked an issue Jul 7, 2024 that may be closed by this pull request
@Advaith3600 Advaith3600 added the enhancement New feature or request label Jul 7, 2024
@Steef-Broeder
Copy link
Author

Thx for you feedback, I will work on it!

@Steef-Broeder
Copy link
Author

I will open a new PR once I fixed the features and so that i can also make branches for them (i forgot last time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom aliases + more currencyies
2 participants