-
Notifications
You must be signed in to change notification settings - Fork 234
[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
base: main
Are you sure you want to change the base?
Conversation
// final hasSelectedQuote = selectedQuote != null; | ||
final hasSelectedPaymentMethod = selectedPaymentMethod != null; | ||
final isPaymentMethodLoaded = paymentMethodState is PaymentMethodLoaded; | ||
final isBuySellQuotLoaded = buySellQuotState is BuySellQuotLoaded; | ||
|
||
return hasSelectedQuote && | ||
hasSelectedPaymentMethod && | ||
return hasSelectedPaymentMethod && |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Description
Please include a summary of the changes and which issue is fixed / feature is added.
Pull Request - Checklist