DTPOMERSER-1274 Select Default currency code#296
Merged
grmeyer-hw-dev merged 5 commits intomasterfrom Mar 25, 2025
Merged
Conversation
Collaborator
Author
|
Testing video Screen.Recording.2025-03-19.at.10.56.07.PM.mov |
|
|
||
| if (selectedDefaultCurrencyCode == null) { | ||
| // If no default currency code is found, use the first currency in the list | ||
| selectedDefaultCurrencyCode = currencyCodes.iterator().next().getCode(); // Get the first currency code |
Collaborator
There was a problem hiding this comment.
MINOR: do not do comments inline, always do them above the line you're commenting for
fzhang4-hw
previously approved these changes
Mar 20, 2025
| Set<Currency> currencyCodes = key.getCurrencies(countryCode) != null ? | ||
| key.getCurrencies(countryCode) : new HashSet<Currency>(); | ||
| // Find the country based on the country code | ||
| Country selectedCountry = null; |
Collaborator
There was a problem hiding this comment.
I noticed this code is duplicated, Can you create method to get country from HyperwalletTransferMethodConfigurationKey?
.../main/java/com/hyperwallet/android/ui/transfermethod/view/SelectTransferMethodPresenter.java
Show resolved
Hide resolved
| } | ||
|
|
||
| // Helper method to get the DefaultCurrencyCode | ||
| private String getDefaultCurrencyCode(@NonNull Country country, @Nullable HyperwalletTransferMethodConfigurationKey keys, |
Collaborator
There was a problem hiding this comment.
Just to keep consistent, Let's assign final in all parameters
Collaborator
grmeyer-hw-dev
left a comment
There was a problem hiding this comment.
Let me release Core-SDK, than you can also bump the Core-SDK version to get green CI build
473ca74
.../main/java/com/hyperwallet/android/ui/transfermethod/view/SelectTransferMethodPresenter.java
Outdated
Show resolved
Hide resolved
grmeyer-hw-dev
approved these changes
Mar 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://paypal.atlassian.net/browse/DTPOMERSER-1274
This PR has
loadCurrency-Modified this method to display defaultcurrencyCode if exists else display first currency from the list.
loadCurrencySelection-Modified this method to select defaultcurrencyCode if exists else display first currency from the list.
Created helper method to get defaultcurrency based on the selected country.
Testing:
Used UAT program.
Graphql query:
Result: