rename success rate label (#2055)

* rename success rate label

* move successRate quote to the recommended section

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
Serhii 2025-03-06 20:04:41 +02:00 committed by GitHub
parent 6cc9f4f757
commit bcbc7ee130
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -16,7 +16,7 @@ extension RecommendationTitle on ProviderRecommendation {
case ProviderRecommendation.lowKyc:
return 'LOW KYC';
case ProviderRecommendation.successRate:
return 'SUCCESS RATE';
return 'HIGHEST SUCCESS RATE';
}
}
}

View file

@ -415,6 +415,17 @@ abstract class BuySellViewModelBase extends WalletChangeListenerViewModel with S
return true;
}).toList();
final List<Quote> successRateQuotes = validQuotes.where((element) =>
element.provider is OnRamperBuyProvider &&
element.recommendations.contains(ProviderRecommendation.successRate)
).toList();
for (final quote in successRateQuotes) {
if (!uniqueProviderQuotes.contains(quote)) {
uniqueProviderQuotes.add(quote);
}
}
sortedRecommendedQuotes.addAll(uniqueProviderQuotes);
sortedQuotes = ObservableList.of(