Merge pull request #525 from cake-tech/CW-175-Refactoring-of-crypto-currency-list

[CW-175] refactoring of crypto currency list
This commit is contained in:
Omar Hatem
2022-12-27 23:02:31 +02:00
committed by GitHub
6 changed files with 93 additions and 337 deletions
+1 -3
View File
@@ -24,7 +24,6 @@ class AddressValidator extends TextValidator {
return '[0-9a-zA-Z_]';
case CryptoCurrency.usdc:
case CryptoCurrency.usdcpoly:
case CryptoCurrency.husd:
case CryptoCurrency.ape:
case CryptoCurrency.avaxc:
case CryptoCurrency.eth:
@@ -156,7 +155,7 @@ class AddressValidator extends TextValidator {
return [98, 99, 106];
case CryptoCurrency.btt:
return [34];
case CryptoCurrency.bttbsc:
case CryptoCurrency.bttc:
return [34];
case CryptoCurrency.doge:
return [34];
@@ -181,7 +180,6 @@ class AddressValidator extends TextValidator {
case CryptoCurrency.stx:
return [40, 41, 42];
case CryptoCurrency.usdcpoly:
case CryptoCurrency.husd:
case CryptoCurrency.mana:
case CryptoCurrency.matic:
case CryptoCurrency.maticpoly:
@@ -27,7 +27,6 @@ class SideShiftExchangeProvider extends ExchangeProvider {
static const List<CryptoCurrency> _notSupported = [
CryptoCurrency.xhv,
CryptoCurrency.dcr,
CryptoCurrency.husd,
CryptoCurrency.kmd,
CryptoCurrency.mkr,
CryptoCurrency.near,
@@ -38,6 +37,7 @@ class SideShiftExchangeProvider extends ExchangeProvider {
CryptoCurrency.rvn,
CryptoCurrency.scrt,
CryptoCurrency.stx,
CryptoCurrency.bttc,
];
static List<ExchangePair> _supportedPairs() {
@@ -56,7 +56,7 @@ class CurrencyPickerState extends State<CurrencyPicker> {
.where((element) =>
(element.title != null ? element.title.toLowerCase().contains(subString.toLowerCase()) : false) ||
(element.tag != null ? element.tag!.toLowerCase().contains(subString.toLowerCase()) : false) ||
(element.name != null ? element.name!.toLowerCase().contains(subString.toLowerCase()) : false))
(element.fullName != null ? element.fullName!.toLowerCase().contains(subString.toLowerCase()) : false))
.toList();
return;
}
@@ -30,7 +30,7 @@ abstract class WalletAddressEditOrCreateViewModelBase with Store {
{required WalletBase wallet, dynamic item})
: isEdit = item != null,
state = AddressEditOrCreateStateInitial(),
label = item?.name as String? ?? '',
label = item?.fullName as String? ?? '',
_item = item,
_wallet = wallet;