mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
CAKE-137
This commit is contained in:
parent
f59812fe4a
commit
ed72cee3f4
2 changed files with 6 additions and 6 deletions
|
@ -31,6 +31,6 @@ Future<void> bootstrap(GlobalKey<NavigatorState> navigatorKey) async {
|
|||
startAuthenticationStateChange(authenticationStore, navigatorKey);
|
||||
startCurrentWalletChangeReaction(
|
||||
appStore, settingsStore, fiatConversionStore);
|
||||
startCurrentFiatChangeReaction(appStore, settingsStore);
|
||||
startCurrentFiatChangeReaction(appStore, settingsStore, fiatConversionStore);
|
||||
startOnCurrentNodeChangeReaction(appStore);
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import 'package:mobx/mobx.dart';
|
||||
import 'package:cake_wallet/core/fiat_conversion_service.dart';
|
||||
import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
||||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
import 'package:cake_wallet/store/app_store.dart';
|
||||
import 'package:cake_wallet/entities/fiat_currency.dart';
|
||||
|
||||
ReactionDisposer _onCurrentFiatCurrencyChangeDisposer;
|
||||
|
||||
void startCurrentFiatChangeReaction(AppStore appStore, SettingsStore settingsStore) {
|
||||
void startCurrentFiatChangeReaction(AppStore appStore, SettingsStore settingsStore, FiatConversionStore fiatConversionStore) {
|
||||
_onCurrentFiatCurrencyChangeDisposer?.reaction?.dispose();
|
||||
_onCurrentFiatCurrencyChangeDisposer = reaction(
|
||||
(_) => settingsStore.fiatCurrency, (FiatCurrency fiatCurrency) async {
|
||||
final cryptoCurrency = appStore.wallet.currency;
|
||||
// final price = await fiatConvertationService.getPrice(
|
||||
// crypto: cryptoCurrency, fiat: fiatCurrency);
|
||||
//
|
||||
// fiatConvertationStore.setPrice(price);
|
||||
fiatConversionStore.price = await FiatConversionService.fetchPrice(
|
||||
cryptoCurrency, settingsStore.fiatCurrency);
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue