mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-27 06:18:50 +01:00
Reformat the whole codebase with 100 line width (#3403)
This commit is contained in:
@@ -46,4 +46,4 @@ void bootstrapOnline(GlobalKey<NavigatorState> navigatorKey, {required bool load
|
||||
if (FeatureFlag.isAutomaticNodeSwitchingEnabled) {
|
||||
getIt.get<NodeSwitchingService>().startHealthCheckTimer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,7 @@ Future<void> startFiatRateUpdate(
|
||||
|
||||
Iterable<CryptoCurrency>? currencies;
|
||||
if (isEVMCompatibleChain(appStore.wallet!.type)) {
|
||||
currencies =
|
||||
evm!.getERC20Currencies(appStore.wallet!).where((element) => element.enabled);
|
||||
currencies = evm!.getERC20Currencies(appStore.wallet!).where((element) => element.enabled);
|
||||
}
|
||||
|
||||
if (appStore.wallet!.type == WalletType.solana) {
|
||||
|
||||
@@ -25,8 +25,7 @@ import 'package:rxdart/subjects.dart';
|
||||
ReactionDisposer? _onAuthenticationStateChange;
|
||||
|
||||
dynamic loginError;
|
||||
StreamController<dynamic> authenticatedErrorStreamController =
|
||||
BehaviorSubject<dynamic>();
|
||||
StreamController<dynamic> authenticatedErrorStreamController = BehaviorSubject<dynamic>();
|
||||
|
||||
void startAuthenticationStateChange(
|
||||
AuthenticationStore authenticationStore,
|
||||
|
||||
@@ -7,19 +7,18 @@ import 'package:cake_wallet/store/app_store.dart';
|
||||
|
||||
ReactionDisposer? _onCurrentFiatCurrencyChangeDisposer;
|
||||
|
||||
void startCurrentFiatApiModeChangeReaction(AppStore appStore,
|
||||
SettingsStore settingsStore, FiatConversionStore fiatConversionStore) {
|
||||
void startCurrentFiatApiModeChangeReaction(
|
||||
AppStore appStore, SettingsStore settingsStore, FiatConversionStore fiatConversionStore) {
|
||||
_onCurrentFiatCurrencyChangeDisposer?.reaction.dispose();
|
||||
_onCurrentFiatCurrencyChangeDisposer = reaction(
|
||||
(_) => settingsStore.fiatApiMode, (FiatApiMode fiatApiMode) async {
|
||||
_onCurrentFiatCurrencyChangeDisposer =
|
||||
reaction((_) => settingsStore.fiatApiMode, (FiatApiMode fiatApiMode) async {
|
||||
if (appStore.wallet == null || fiatApiMode == FiatApiMode.disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
fiatConversionStore.prices[appStore.wallet!.currency] =
|
||||
await FiatConversionService.fetchPrice(
|
||||
crypto: appStore.wallet!.currency,
|
||||
fiat: settingsStore.fiatCurrency,
|
||||
torOnly: fiatApiMode == FiatApiMode.torOnly);
|
||||
fiatConversionStore.prices[appStore.wallet!.currency] = await FiatConversionService.fetchPrice(
|
||||
crypto: appStore.wallet!.currency,
|
||||
fiat: settingsStore.fiatCurrency,
|
||||
torOnly: fiatApiMode == FiatApiMode.torOnly);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8,20 +8,19 @@ import 'package:cake_wallet/entities/fiat_currency.dart';
|
||||
|
||||
ReactionDisposer? _onCurrentFiatCurrencyChangeDisposer;
|
||||
|
||||
void startCurrentFiatChangeReaction(AppStore appStore,
|
||||
SettingsStore settingsStore, FiatConversionStore fiatConversionStore) {
|
||||
void startCurrentFiatChangeReaction(
|
||||
AppStore appStore, SettingsStore settingsStore, FiatConversionStore fiatConversionStore) {
|
||||
_onCurrentFiatCurrencyChangeDisposer?.reaction.dispose();
|
||||
_onCurrentFiatCurrencyChangeDisposer = reaction(
|
||||
(_) => settingsStore.fiatCurrency, (FiatCurrency fiatCurrency) async {
|
||||
_onCurrentFiatCurrencyChangeDisposer =
|
||||
reaction((_) => settingsStore.fiatCurrency, (FiatCurrency fiatCurrency) async {
|
||||
if (appStore.wallet == null || settingsStore.fiatApiMode == FiatApiMode.disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
final cryptoCurrency = appStore.wallet!.currency;
|
||||
fiatConversionStore.prices[cryptoCurrency] =
|
||||
await FiatConversionService.fetchPrice(
|
||||
crypto: cryptoCurrency,
|
||||
fiat: fiatCurrency,
|
||||
torOnly: settingsStore.fiatApiMode == FiatApiMode.torOnly);
|
||||
fiatConversionStore.prices[cryptoCurrency] = await FiatConversionService.fetchPrice(
|
||||
crypto: cryptoCurrency,
|
||||
fiat: fiatCurrency,
|
||||
torOnly: settingsStore.fiatApiMode == FiatApiMode.torOnly);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -113,8 +113,7 @@ void startCurrentWalletChangeReaction(
|
||||
}
|
||||
|
||||
if (wallet.type == WalletType.solana) {
|
||||
await solana!
|
||||
.discoverAndAddWalletTokens(wallet);
|
||||
await solana!.discoverAndAddWalletTokens(wallet);
|
||||
}
|
||||
} catch (e) {
|
||||
printV(e.toString());
|
||||
|
||||
Reference in New Issue
Block a user