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>
Serhii committed
Mar 6, 2025 at 20:04 UTC
bcbc7ee130ec2a49a38637afde961e2053ea8cab
2 files changed
+12
-1
lib/buy/buy_quote.dart
+1
-1
@@ -16,7 +16,7 @@ extension RecommendationTitle on ProviderRecommendation {
16
case ProviderRecommendation.lowKyc:
17
return 'LOW KYC';
18
case ProviderRecommendation.successRate:
19
- return 'SUCCESS RATE';
19
+ return 'HIGHEST SUCCESS RATE';
20
}
21
}
22
}
lib/view_model/buy/buy_sell_view_model.dart
+11
@@ -415,6 +415,17 @@ abstract class BuySellViewModelBase extends WalletChangeListenerViewModel with S
415
return true;
416
}).toList();
417
418
+ final List<Quote> successRateQuotes = validQuotes.where((element) =>
419
+ element.provider is OnRamperBuyProvider &&
420
+ element.recommendations.contains(ProviderRecommendation.successRate)
421
+ ).toList();
422
+
423
+ for (final quote in successRateQuotes) {
424
+ if (!uniqueProviderQuotes.contains(quote)) {
425
+ uniqueProviderQuotes.add(quote);
426
+ }
427
+ }
428
+
429
sortedRecommendedQuotes.addAll(uniqueProviderQuotes);
430
431
sortedQuotes = ObservableList.of(