undf: assign 920-922; stamp wasabi patches
This commit is contained in:
parent
737891b5a1
commit
b62fd27e28
7 changed files with 302 additions and 4 deletions
48
defects/cake_wallet-0002/patch/cake_wallet-0002.patch
Normal file
48
defects/cake_wallet-0002/patch/cake_wallet-0002.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
--- a/lib/exchange/utils/currency_pairs_utils.dart
|
||||
+++ b/lib/exchange/utils/currency_pairs_utils.dart
|
||||
@@ -1,12 +1,13 @@
|
||||
import 'package:cake_wallet/exchange/exchange_pair.dart';
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
|
||||
List<ExchangePair> supportedPairs(List<CryptoCurrency> notSupported) {
|
||||
+ final notSupportedSet = notSupported.toSet();
|
||||
final supportedCurrencies =
|
||||
- CryptoCurrency.all.where((element) => !notSupported.contains(element)).toList();
|
||||
+ CryptoCurrency.all.where((element) => !notSupportedSet.contains(element)).toList();
|
||||
|
||||
return supportedCurrencies
|
||||
.map((i) => supportedCurrencies.map((k) => ExchangePair(from: i, to: k, reverse: true)))
|
||||
.expand((i) => i)
|
||||
.toList();
|
||||
}
|
||||
--- a/lib/buy/pairs_utils.dart
|
||||
+++ b/lib/buy/pairs_utils.dart
|
||||
@@ -11,8 +11,10 @@
|
||||
List<TradePair<CryptoCurrency, FiatCurrency>> supportedCryptoToFiatPairs({
|
||||
required List<CryptoCurrency> notSupportedCrypto,
|
||||
required List<FiatCurrency> notSupportedFiat,
|
||||
}) {
|
||||
+ final notSupportedCryptoSet = notSupportedCrypto.toSet();
|
||||
+ final notSupportedFiatSet = notSupportedFiat.toSet();
|
||||
final supportedCrypto =
|
||||
- CryptoCurrency.all.where((crypto) => !notSupportedCrypto.contains(crypto)).toList();
|
||||
- final supportedFiat = FiatCurrency.all.where((fiat) => !notSupportedFiat.contains(fiat)).toList();
|
||||
+ CryptoCurrency.all.where((crypto) => !notSupportedCryptoSet.contains(crypto)).toList();
|
||||
+ final supportedFiat = FiatCurrency.all.where((fiat) => !notSupportedFiatSet.contains(fiat)).toList();
|
||||
|
||||
return supportedCrypto
|
||||
.expand((crypto) => supportedFiat
|
||||
@@ -25,8 +27,10 @@
|
||||
List<TradePair<FiatCurrency, CryptoCurrency>> supportedFiatToCryptoPairs({
|
||||
required List<FiatCurrency> notSupportedFiat,
|
||||
required List<CryptoCurrency> notSupportedCrypto,
|
||||
}) {
|
||||
- final supportedFiat = FiatCurrency.all.where((fiat) => !notSupportedFiat.contains(fiat)).toList();
|
||||
+ final notSupportedFiatSet = notSupportedFiat.toSet();
|
||||
+ final notSupportedCryptoSet = notSupportedCrypto.toSet();
|
||||
+ final supportedFiat = FiatCurrency.all.where((fiat) => !notSupportedFiatSet.contains(fiat)).toList();
|
||||
final supportedCrypto =
|
||||
- CryptoCurrency.all.where((crypto) => !notSupportedCrypto.contains(crypto)).toList();
|
||||
+ CryptoCurrency.all.where((crypto) => !notSupportedCryptoSet.contains(crypto)).toList();
|
||||
|
||||
return supportedFiat
|
||||
Loading…
Add table
Add a link
Reference in a new issue