mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-04 12:34:14 +01:00
Cw 805 fix bch refund address (#1782)
* fix bch address format for exolix, stealth, thorchain, simpleswap * exclude SP and MWEB from the exchange address book * address pr review comments
This commit is contained in:
@@ -99,18 +99,23 @@ abstract class ContactListViewModelBase with Store {
|
||||
|
||||
Future<void> delete(ContactRecord contact) async => contact.original.delete();
|
||||
|
||||
@computed
|
||||
List<ContactRecord> get contactsToShow =>
|
||||
contacts.where((element) => _isValidForCurrency(element)).toList();
|
||||
ObservableList<ContactRecord> get contactsToShow =>
|
||||
ObservableList.of(contacts.where((element) => _isValidForCurrency(element)));
|
||||
|
||||
@computed
|
||||
List<WalletContact> get walletContactsToShow =>
|
||||
walletContacts.where((element) => _isValidForCurrency(element)).toList();
|
||||
|
||||
bool _isValidForCurrency(ContactBase element) {
|
||||
if (element.name.contains('Silent Payments')) return false;
|
||||
if (element.name.contains('MWEB')) return false;
|
||||
|
||||
return _currency == null ||
|
||||
element.type == _currency ||
|
||||
element.type.title == _currency!.tag ||
|
||||
element.type.tag == _currency!.tag;
|
||||
(element.type.tag != null &&
|
||||
_currency?.tag != null &&
|
||||
element.type.tag == _currency?.tag) ||
|
||||
_currency?.toString() == element.type.tag ||
|
||||
_currency?.tag == element.type.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user