mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 21:04:53 +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);
|
startAuthenticationStateChange(authenticationStore, navigatorKey);
|
||||||
startCurrentWalletChangeReaction(
|
startCurrentWalletChangeReaction(
|
||||||
appStore, settingsStore, fiatConversionStore);
|
appStore, settingsStore, fiatConversionStore);
|
||||||
startCurrentFiatChangeReaction(appStore, settingsStore);
|
startCurrentFiatChangeReaction(appStore, settingsStore, fiatConversionStore);
|
||||||
startOnCurrentNodeChangeReaction(appStore);
|
startOnCurrentNodeChangeReaction(appStore);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
import 'package:mobx/mobx.dart';
|
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/settings_store.dart';
|
||||||
import 'package:cake_wallet/store/app_store.dart';
|
import 'package:cake_wallet/store/app_store.dart';
|
||||||
import 'package:cake_wallet/entities/fiat_currency.dart';
|
import 'package:cake_wallet/entities/fiat_currency.dart';
|
||||||
|
|
||||||
ReactionDisposer _onCurrentFiatCurrencyChangeDisposer;
|
ReactionDisposer _onCurrentFiatCurrencyChangeDisposer;
|
||||||
|
|
||||||
void startCurrentFiatChangeReaction(AppStore appStore, SettingsStore settingsStore) {
|
void startCurrentFiatChangeReaction(AppStore appStore, SettingsStore settingsStore, FiatConversionStore fiatConversionStore) {
|
||||||
_onCurrentFiatCurrencyChangeDisposer?.reaction?.dispose();
|
_onCurrentFiatCurrencyChangeDisposer?.reaction?.dispose();
|
||||||
_onCurrentFiatCurrencyChangeDisposer = reaction(
|
_onCurrentFiatCurrencyChangeDisposer = reaction(
|
||||||
(_) => settingsStore.fiatCurrency, (FiatCurrency fiatCurrency) async {
|
(_) => settingsStore.fiatCurrency, (FiatCurrency fiatCurrency) async {
|
||||||
final cryptoCurrency = appStore.wallet.currency;
|
final cryptoCurrency = appStore.wallet.currency;
|
||||||
// final price = await fiatConvertationService.getPrice(
|
fiatConversionStore.price = await FiatConversionService.fetchPrice(
|
||||||
// crypto: cryptoCurrency, fiat: fiatCurrency);
|
cryptoCurrency, settingsStore.fiatCurrency);
|
||||||
//
|
|
||||||
// fiatConvertationStore.setPrice(price);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in a new issue