Add trocador exchange provider

This commit is contained in:
Godwin Asuquo
2023-02-06 21:20:43 +02:00
parent 61050ac715
commit 032a8c8c33
19 changed files with 453 additions and 108 deletions
@@ -1,3 +1,4 @@
import 'package:cake_wallet/entities/fiat_api_mode.dart';
import 'package:cake_wallet/wallet_type_utils.dart';
import 'package:cw_core/transaction_history.dart';
import 'package:cw_core/balance.dart';
@@ -96,6 +97,11 @@ abstract class DashboardViewModelBase with Store {
caption: ExchangeProviderDescription.simpleSwap.title,
onChanged: () => tradeFilterStore
.toggleDisplayExchange(ExchangeProviderDescription.simpleSwap)),
FilterItem(
value: () => tradeFilterStore.displayTrocador,
caption: ExchangeProviderDescription.trocador.title,
onChanged: () => tradeFilterStore
.toggleDisplayExchange(ExchangeProviderDescription.trocador)),
]
},
subname = '',
@@ -268,7 +274,7 @@ abstract class DashboardViewModelBase with Store {
settingsStore.shouldShowYatPopup = shouldShow;
@computed
bool get isEnabledExchangeAction => !settingsStore.disableExchange;
bool get isEnabledExchangeAction => settingsStore.exchangeStatus != FiatApiMode.disabled;
@observable
bool hasExchangeAction;