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:
@@ -232,7 +232,6 @@ abstract class ConnectionSyncViewModelBase with Store {
|
||||
@computed
|
||||
bool get canUseTronGrid => _wallet.type == WalletType.tron;
|
||||
|
||||
|
||||
@action
|
||||
void setUseMempoolFeeAPI(bool value) => _settingsStore.useMempoolFeeAPI = value;
|
||||
|
||||
@@ -249,7 +248,10 @@ abstract class ConnectionSyncViewModelBase with Store {
|
||||
@action
|
||||
void setUseBlinkProtection(bool value) => _settingsStore.useBlinkProtection = value;
|
||||
|
||||
bool get hasRescan => _wallet.hasRescan && _wallet.type != WalletType.bitcoin && _wallet.type != WalletType.litecoin;
|
||||
bool get hasRescan =>
|
||||
_wallet.hasRescan &&
|
||||
_wallet.type != WalletType.bitcoin &&
|
||||
_wallet.type != WalletType.litecoin;
|
||||
|
||||
@action
|
||||
void setUseEtherscan(bool value) {
|
||||
|
||||
@@ -59,7 +59,7 @@ abstract class DisplaySettingsViewModelBase with Store {
|
||||
|
||||
@computed
|
||||
bool get showAddressBookPopup => _settingsStore.showAddressBookPopupEnabled;
|
||||
|
||||
|
||||
@computed
|
||||
bool get showZcashCard => _settingsStore.showZcashMissingFundsCard;
|
||||
|
||||
@@ -126,7 +126,8 @@ abstract class DisplaySettingsViewModelBase with Store {
|
||||
bool get showZcashCardSetting => _appStore.wallet?.type == WalletType.zcash;
|
||||
|
||||
@action
|
||||
void setDisplayAmountsInSatoshi(BitcoinAmountDisplayMode value) => _settingsStore.displayAmountsInSatoshi = value;
|
||||
void setDisplayAmountsInSatoshi(BitcoinAmountDisplayMode value) =>
|
||||
_settingsStore.displayAmountsInSatoshi = value;
|
||||
|
||||
@action
|
||||
void setShowZcashCard(bool value) => _settingsStore.showZcashMissingFundsCard = value;
|
||||
|
||||
@@ -5,11 +5,11 @@ import 'package:flutter/material.dart';
|
||||
class LinkListItem extends SettingsListItem {
|
||||
LinkListItem(
|
||||
{required String title,
|
||||
required this.link,
|
||||
required this.linkTitle,
|
||||
this.icon,
|
||||
this.lightIcon,
|
||||
this.hasIconColor = false})
|
||||
required this.link,
|
||||
required this.linkTitle,
|
||||
this.icon,
|
||||
this.lightIcon,
|
||||
this.hasIconColor = false})
|
||||
: super(title);
|
||||
|
||||
final String? icon;
|
||||
@@ -17,4 +17,4 @@ class LinkListItem extends SettingsListItem {
|
||||
final String link;
|
||||
final String linkTitle;
|
||||
final bool hasIconColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,18 +66,18 @@ abstract class OtherSettingsViewModelBase with Store {
|
||||
void setAutoGenerateSubaddresses(bool value) {
|
||||
_wallet.isEnabledAutoGenerateSubaddress = value;
|
||||
_settingsStore.autoGenerateSubaddressStatus =
|
||||
value ? AutoGenerateSubaddressStatus.enabled : AutoGenerateSubaddressStatus.disabled;
|
||||
value ? AutoGenerateSubaddressStatus.enabled : AutoGenerateSubaddressStatus.disabled;
|
||||
}
|
||||
|
||||
bool get isAutoGenerateSubaddressesVisible => [
|
||||
WalletType.monero,
|
||||
WalletType.wownero,
|
||||
WalletType.bitcoin,
|
||||
WalletType.litecoin,
|
||||
WalletType.bitcoinCash,
|
||||
WalletType.dogecoin,
|
||||
WalletType.decred
|
||||
].contains(_wallet.type);
|
||||
WalletType.monero,
|
||||
WalletType.wownero,
|
||||
WalletType.bitcoin,
|
||||
WalletType.litecoin,
|
||||
WalletType.bitcoinCash,
|
||||
WalletType.dogecoin,
|
||||
WalletType.decred
|
||||
].contains(_wallet.type);
|
||||
|
||||
@computed
|
||||
bool get isMoneroWallet => _wallet.type == WalletType.monero;
|
||||
|
||||
@@ -49,8 +49,7 @@ abstract class PrivacySettingsViewModelBase with Store {
|
||||
].contains(_wallet.type);
|
||||
|
||||
@computed
|
||||
bool get hasCoinControl =>
|
||||
[
|
||||
bool get hasCoinControl => [
|
||||
WalletType.bitcoin,
|
||||
WalletType.litecoin,
|
||||
WalletType.monero,
|
||||
@@ -112,7 +111,8 @@ abstract class PrivacySettingsViewModelBase with Store {
|
||||
bool get canUsePayjoin => _wallet.type == WalletType.bitcoin && DeviceInfo.instance.isMobile;
|
||||
|
||||
@computed
|
||||
bool get canUseLightning => _wallet.type == WalletType.bitcoin && !Platform.isWindows && !Platform.isLinux;
|
||||
bool get canUseLightning =>
|
||||
_wallet.type == WalletType.bitcoin && !Platform.isWindows && !Platform.isLinux;
|
||||
|
||||
@computed
|
||||
bool get useLightning => _wallet.type == WalletType.bitcoin && bitcoin!.useLightning(_wallet);
|
||||
|
||||
@@ -5,4 +5,4 @@ class RegularListItem extends SettingsListItem {
|
||||
RegularListItem({required String title, this.handler}) : super(title);
|
||||
|
||||
final void Function(BuildContext context)? handler;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ part 'security_settings_view_model.g.dart';
|
||||
class SecuritySettingsViewModel = SecuritySettingsViewModelBase with _$SecuritySettingsViewModel;
|
||||
|
||||
abstract class SecuritySettingsViewModelBase with Store {
|
||||
SecuritySettingsViewModelBase(this._settingsStore, this._authService) : _biometricAuth = BiometricAuth();
|
||||
SecuritySettingsViewModelBase(this._settingsStore, this._authService)
|
||||
: _biometricAuth = BiometricAuth();
|
||||
|
||||
final BiometricAuth _biometricAuth;
|
||||
final SettingsStore _settingsStore;
|
||||
@@ -51,9 +52,7 @@ abstract class SecuritySettingsViewModelBase with Store {
|
||||
_settingsStore.pinTimeOutDuration = duration;
|
||||
|
||||
@action
|
||||
void setEnableDuressPin(bool value) =>
|
||||
_settingsStore.enableDuressPin = value;
|
||||
void setEnableDuressPin(bool value) => _settingsStore.enableDuressPin = value;
|
||||
|
||||
Future<void> clearDuressPin() async => await _authService.clearDuressPin();
|
||||
|
||||
}
|
||||
|
||||
@@ -3,10 +3,7 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:cake_wallet/view_model/settings/settings_list_item.dart';
|
||||
|
||||
class SwitcherListItem extends SettingsListItem {
|
||||
SwitcherListItem(
|
||||
{required String title,
|
||||
required this.value,
|
||||
required this.onValueChange})
|
||||
SwitcherListItem({required String title, required this.value, required this.onValueChange})
|
||||
: super(title);
|
||||
|
||||
final bool Function() value;
|
||||
|
||||
@@ -28,10 +28,7 @@ abstract class TrocadorProvidersViewModelBase with Store {
|
||||
ObservableFuture(trocadorExchangeProvider.fetchProviders().then((providers) {
|
||||
var providerNames = providers.map((e) => e.name).toList();
|
||||
|
||||
providerRatings = {
|
||||
for (var provider in providers)
|
||||
provider.name: provider.rating
|
||||
};
|
||||
providerRatings = {for (var provider in providers) provider.name: provider.rating};
|
||||
|
||||
return _settingsStore
|
||||
.updateAllTrocadorProviderStates(providerNames)
|
||||
|
||||
@@ -3,4 +3,4 @@ import 'package:cake_wallet/view_model/settings/settings_list_item.dart';
|
||||
|
||||
class VersionListItem extends SettingsListItem {
|
||||
VersionListItem({required String title}) : super(title);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user