Generic Fixes (#1373)

* Fix exchanges not showing

* Fix button text on Monero receive screen

* Temp fix for ERC20 and SPL tokens not having raw value

* Manually Add Trocador new providers temporarily until API integration

* properly handle nullability of n2 node [skip ci]

---------

Co-authored-by: tuxsudo <tuxsudo@tux.pizza>
This commit is contained in:
Omar Hatem
2024-04-12 16:01:21 +02:00
committed by GitHub
co-authored by tuxsudo
parent fce6394bca
commit 1769db1641
6 changed files with 21 additions and 12 deletions
@@ -32,7 +32,17 @@ class TrocadorExchangeProvider extends ExchangeProvider {
'Exolix',
'Godex',
'Exch',
'CoinCraddle'
'CoinCraddle',
'Alfacash',
'LocalMonero',
'XChange',
'NeroSwap',
'Changee',
'BitcoinVN',
'EasyBit',
'WizardSwap',
'Quantex',
'SwapSpace',
];
static const List<CryptoCurrency> _notSupported = [
+5 -3
View File
@@ -156,10 +156,10 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
return priority;
}
int? getCustomPriorityIndex(List<TransactionPriority> priorities) {
if (wallet.type == WalletType.bitcoin) {
final customItem = priorities.firstWhereOrNull((element) => element == bitcoin!.getBitcoinTransactionPriorityCustom());
final customItem = priorities
.firstWhereOrNull((element) => element == bitcoin!.getBitcoinTransactionPriorityCustom());
return customItem != null ? priorities.indexOf(customItem) : null;
}
@@ -503,7 +503,9 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
address = output.address;
}
if (address.isNotEmpty && !contactAddresses.contains(address)) {
if (address.isNotEmpty &&
!contactAddresses.contains(address) &&
selectedCryptoCurrency.raw != -1) {
return ContactRecord(
contactListViewModel.contactSource,
Contact(
@@ -213,10 +213,6 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo
return S.current.addresses;
}
if (isAutoGenerateSubaddressEnabled) {
return hasAccounts ? S.current.accounts : S.current.account;
}
return hasAccounts ? S.current.accounts_subaddresses : S.current.addresses;
}