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
parent fce6394bca
commit 1769db1641
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 21 additions and 12 deletions

View file

@ -14,7 +14,7 @@ class N2Node {
String? alias; String? alias;
factory N2Node.fromJson(Map<String, dynamic> json) => N2Node( factory N2Node.fromJson(Map<String, dynamic> json) => N2Node(
weight: double.tryParse((json['weight'] as num).toString()), weight: double.tryParse((json['weight'] as num?).toString()),
uptime: json['uptime'] as String?, uptime: json['uptime'] as String?,
score: json['score'] as int?, score: json['score'] as int?,
account: json['rep_address'] as String?, account: json['rep_address'] as String?,

View file

@ -41,5 +41,6 @@ abstract class WalletAddresses {
} }
} }
bool containsAddress(String address) => allAddressesMap.containsKey(address); bool containsAddress(String address) =>
addressesMap.containsKey(address) || allAddressesMap.containsKey(address);
} }

View file

@ -32,7 +32,17 @@ class TrocadorExchangeProvider extends ExchangeProvider {
'Exolix', 'Exolix',
'Godex', 'Godex',
'Exch', 'Exch',
'CoinCraddle' 'CoinCraddle',
'Alfacash',
'LocalMonero',
'XChange',
'NeroSwap',
'Changee',
'BitcoinVN',
'EasyBit',
'WizardSwap',
'Quantex',
'SwapSpace',
]; ];
static const List<CryptoCurrency> _notSupported = [ static const List<CryptoCurrency> _notSupported = [

View file

@ -156,10 +156,10 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
return priority; return priority;
} }
int? getCustomPriorityIndex(List<TransactionPriority> priorities) { int? getCustomPriorityIndex(List<TransactionPriority> priorities) {
if (wallet.type == WalletType.bitcoin) { 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; return customItem != null ? priorities.indexOf(customItem) : null;
} }
@ -503,7 +503,9 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
address = output.address; address = output.address;
} }
if (address.isNotEmpty && !contactAddresses.contains(address)) { if (address.isNotEmpty &&
!contactAddresses.contains(address) &&
selectedCryptoCurrency.raw != -1) {
return ContactRecord( return ContactRecord(
contactListViewModel.contactSource, contactListViewModel.contactSource,
Contact( Contact(

View file

@ -213,10 +213,6 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo
return S.current.addresses; return S.current.addresses;
} }
if (isAutoGenerateSubaddressEnabled) {
return hasAccounts ? S.current.accounts : S.current.account;
}
return hasAccounts ? S.current.accounts_subaddresses : S.current.addresses; return hasAccounts ? S.current.accounts_subaddresses : S.current.addresses;
} }

View file

@ -18,8 +18,8 @@ MONERO_COM_BUILD_NUMBER=77
MONERO_COM_BUNDLE_ID="com.cakewallet.monero" MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="4.15.3" CAKEWALLET_VERSION="4.16.0"
CAKEWALLET_BUILD_NUMBER=221 CAKEWALLET_BUILD_NUMBER=226
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
HAVEN_NAME="Haven" HAVEN_NAME="Haven"