Skip to content

[DNM] ui: show EUR offers for SEPA currencies on onramping screen #2180

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MrCyjaneK
Copy link
Collaborator

Description

Please include a summary of the changes and which issue is fixed / feature is added.

Pull Request - Checklist

  • Initial Manual Tests Passed
  • Double check modified code and verify it with the feature/task requirements
  • Format code
  • Look for code duplication
  • Clear naming for variables and methods

Comment on lines 152 to 157
// final hasSelectedQuote = selectedQuote != null;
final hasSelectedPaymentMethod = selectedPaymentMethod != null;
final isPaymentMethodLoaded = paymentMethodState is PaymentMethodLoaded;
final isBuySellQuotLoaded = buySellQuotState is BuySellQuotLoaded;

return hasSelectedQuote &&
hasSelectedPaymentMethod &&
return hasSelectedPaymentMethod &&
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change? it shouldn't be ready until the user selects a quote

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With this change we do not have any details regarding the quote because we don't select the quote by default from EUR-only providers (if the currency is SEPA enabled), as this would be unreliable. We just do not calculate anything in terms of price because

  • provider cannot give use price in local currency
  • we cannot calculate the price on our own because we do not include SEPA fees and provider fees, so using for example priceapi wouldn't work.

Yet we still need to mark the trade as ready to allow the user to click the button - so if there is any quote (even in foreign currency) we unlock the button


final Set<String> addedProviders = {};
final List<Quote> uniqueProviderQuotes = validQuotes.where((element) {

final List<Quote> uniqueProviderQuotesNative = validQuotesNative.where((element) {
Copy link
Contributor

Choose a reason for hiding this comment

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

and I feel like there is something missing in this part and the one below, but I am not sure, so I will let @Serhii-Borodenko chime in

Copy link
Contributor

Choose a reason for hiding this comment

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

So far, the only issue I see is with the “Recommended” section. With the current implementation, only successRateQuotes are added there, which means only Onramper quotes with the successRate label. And if we don’t want to duplicate providers that already have native quotes with SEPA quotes in the ‘Recommended’ section, then we don’t need uniqueProviderQuotesSepa

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah it is messed up, I'll resolve this

@MrCyjaneK MrCyjaneK changed the title ui: show EUR offers for SEPA currencies on onramping screen [DNM] ui: show EUR offers for SEPA currencies on onramping screen Apr 11, 2025
@MrCyjaneK MrCyjaneK marked this pull request as draft April 18, 2025 14:19
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.

3 participants