mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 09:47:35 +00:00
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into CW-239-fix-restore-from-backup-using-6-digit-pin
Conflicts: lib/store/settings_store.dart
This commit is contained in:
commit
f97a4fec28
38 changed files with 353 additions and 115 deletions
|
@ -51,6 +51,10 @@ class CWBitcoin extends Bitcoin {
|
||||||
TransactionPriority deserializeBitcoinTransactionPriority(int raw)
|
TransactionPriority deserializeBitcoinTransactionPriority(int raw)
|
||||||
=> BitcoinTransactionPriority.deserialize(raw: raw);
|
=> BitcoinTransactionPriority.deserialize(raw: raw);
|
||||||
|
|
||||||
|
@override
|
||||||
|
TransactionPriority deserializeLitecoinTransactionPriority(int raw)
|
||||||
|
=> LitecoinTransactionPriority.deserialize(raw: raw);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int getFeeRate(Object wallet, TransactionPriority priority) {
|
int getFeeRate(Object wallet, TransactionPriority priority) {
|
||||||
final bitcoinWallet = wallet as ElectrumWallet;
|
final bitcoinWallet = wallet as ElectrumWallet;
|
||||||
|
|
|
@ -214,6 +214,7 @@ class BackupService {
|
||||||
final currentBitcoinElectrumSererId = data[PreferencesKey.currentBitcoinElectrumSererIdKey] as int?;
|
final currentBitcoinElectrumSererId = data[PreferencesKey.currentBitcoinElectrumSererIdKey] as int?;
|
||||||
final currentLanguageCode = data[PreferencesKey.currentLanguageCode] as String?;
|
final currentLanguageCode = data[PreferencesKey.currentLanguageCode] as String?;
|
||||||
final displayActionListMode = data[PreferencesKey.displayActionListModeKey] as int?;
|
final displayActionListMode = data[PreferencesKey.displayActionListModeKey] as int?;
|
||||||
|
final fiatApiMode = data[PreferencesKey.currentFiatApiModeKey] as int?;
|
||||||
final currentPinLength = data[PreferencesKey.currentPinLength] as int?;
|
final currentPinLength = data[PreferencesKey.currentPinLength] as int?;
|
||||||
final currentTheme = data[PreferencesKey.currentTheme] as int?;
|
final currentTheme = data[PreferencesKey.currentTheme] as int?;
|
||||||
final disableExchange = data[PreferencesKey.disableExchangeKey] as bool?;
|
final disableExchange = data[PreferencesKey.disableExchangeKey] as bool?;
|
||||||
|
@ -267,6 +268,10 @@ class BackupService {
|
||||||
await _sharedPreferences.setInt(PreferencesKey.displayActionListModeKey,
|
await _sharedPreferences.setInt(PreferencesKey.displayActionListModeKey,
|
||||||
displayActionListMode);
|
displayActionListMode);
|
||||||
|
|
||||||
|
if (fiatApiMode != null)
|
||||||
|
await _sharedPreferences.setInt(PreferencesKey.currentFiatApiModeKey,
|
||||||
|
fiatApiMode);
|
||||||
|
|
||||||
if (currentPinLength != null)
|
if (currentPinLength != null)
|
||||||
await _sharedPreferences.setInt(PreferencesKey.currentPinLength,
|
await _sharedPreferences.setInt(PreferencesKey.currentPinLength,
|
||||||
currentPinLength);
|
currentPinLength);
|
||||||
|
@ -434,6 +439,8 @@ class BackupService {
|
||||||
_sharedPreferences.getInt(PreferencesKey.bitcoinTransactionPriority),
|
_sharedPreferences.getInt(PreferencesKey.bitcoinTransactionPriority),
|
||||||
PreferencesKey.moneroTransactionPriority:
|
PreferencesKey.moneroTransactionPriority:
|
||||||
_sharedPreferences.getInt(PreferencesKey.moneroTransactionPriority),
|
_sharedPreferences.getInt(PreferencesKey.moneroTransactionPriority),
|
||||||
|
PreferencesKey.currentFiatApiModeKey:
|
||||||
|
_sharedPreferences.getInt(PreferencesKey.currentFiatApiModeKey),
|
||||||
};
|
};
|
||||||
|
|
||||||
return json.encode(preferences);
|
return json.encode(preferences);
|
||||||
|
|
39
lib/entities/fiat_api_mode.dart
Normal file
39
lib/entities/fiat_api_mode.dart
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
import 'package:cw_core/enumerable_item.dart';
|
||||||
|
|
||||||
|
class FiatApiMode extends EnumerableItem<int> with Serializable<int> {
|
||||||
|
const FiatApiMode({required String title, required int raw}) : super(title: title, raw: raw);
|
||||||
|
|
||||||
|
static const all = [FiatApiMode.enabled, FiatApiMode.torOnly, FiatApiMode.disabled];
|
||||||
|
|
||||||
|
static const enabled = FiatApiMode(raw: 0, title: 'Enabled');
|
||||||
|
static const torOnly = FiatApiMode(raw: 1, title: 'Tor only');
|
||||||
|
static const disabled = FiatApiMode(raw: 2, title: 'Disabled');
|
||||||
|
|
||||||
|
static FiatApiMode deserialize({required int raw}) {
|
||||||
|
switch (raw) {
|
||||||
|
case 0:
|
||||||
|
return enabled;
|
||||||
|
case 1:
|
||||||
|
return torOnly;
|
||||||
|
case 2:
|
||||||
|
return disabled;
|
||||||
|
default:
|
||||||
|
throw Exception('Unexpected token: $raw for FiatApiMode deserialize');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
switch (this) {
|
||||||
|
case FiatApiMode.enabled:
|
||||||
|
return S.current.enabled;
|
||||||
|
case FiatApiMode.torOnly:
|
||||||
|
return S.current.tor_only;
|
||||||
|
case FiatApiMode.disabled:
|
||||||
|
return S.current.disabled;
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,6 +9,7 @@ class PreferencesKey {
|
||||||
static const currentTransactionPriorityKeyLegacy = 'current_fee_priority';
|
static const currentTransactionPriorityKeyLegacy = 'current_fee_priority';
|
||||||
static const currentBalanceDisplayModeKey = 'current_balance_display_mode';
|
static const currentBalanceDisplayModeKey = 'current_balance_display_mode';
|
||||||
static const shouldSaveRecipientAddressKey = 'save_recipient_address';
|
static const shouldSaveRecipientAddressKey = 'save_recipient_address';
|
||||||
|
static const currentFiatApiModeKey = 'current_fiat_api_mode';
|
||||||
static const allowBiometricalAuthenticationKey =
|
static const allowBiometricalAuthenticationKey =
|
||||||
'allow_biometrical_authentication';
|
'allow_biometrical_authentication';
|
||||||
static const disableExchangeKey = 'disable_exchange';
|
static const disableExchangeKey = 'disable_exchange';
|
||||||
|
@ -21,6 +22,8 @@ class PreferencesKey {
|
||||||
'current_default_settings_migration_version';
|
'current_default_settings_migration_version';
|
||||||
static const moneroTransactionPriority = 'current_fee_priority_monero';
|
static const moneroTransactionPriority = 'current_fee_priority_monero';
|
||||||
static const bitcoinTransactionPriority = 'current_fee_priority_bitcoin';
|
static const bitcoinTransactionPriority = 'current_fee_priority_bitcoin';
|
||||||
|
static const havenTransactionPriority = 'current_fee_priority_haven';
|
||||||
|
static const litecoinTransactionPriority = 'current_fee_priority_litecoin';
|
||||||
static const shouldShowReceiveWarning = 'should_show_receive_warning';
|
static const shouldShowReceiveWarning = 'should_show_receive_warning';
|
||||||
static const shouldShowYatPopup = 'should_show_yat_popup';
|
static const shouldShowYatPopup = 'should_show_yat_popup';
|
||||||
static const moneroWalletPasswordUpdateV1Base = 'monero_wallet_update_v1';
|
static const moneroWalletPasswordUpdateV1Base = 'monero_wallet_update_v1';
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'package:cake_wallet/reactions/fiat_rate_update.dart';
|
||||||
import 'package:cake_wallet/reactions/on_current_node_change.dart';
|
import 'package:cake_wallet/reactions/on_current_node_change.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
@ -31,4 +32,5 @@ Future<void> bootstrap(GlobalKey<NavigatorState> navigatorKey) async {
|
||||||
appStore, settingsStore, fiatConversionStore);
|
appStore, settingsStore, fiatConversionStore);
|
||||||
startCurrentFiatChangeReaction(appStore, settingsStore, fiatConversionStore);
|
startCurrentFiatChangeReaction(appStore, settingsStore, fiatConversionStore);
|
||||||
startOnCurrentNodeChangeReaction(appStore);
|
startOnCurrentNodeChangeReaction(appStore);
|
||||||
|
startFiatRateUpdate(appStore, settingsStore, fiatConversionStore);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:cake_wallet/core/fiat_conversion_service.dart';
|
import 'package:cake_wallet/core/fiat_conversion_service.dart';
|
||||||
|
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||||
import 'package:cake_wallet/entities/update_haven_rate.dart';
|
import 'package:cake_wallet/entities/update_haven_rate.dart';
|
||||||
import 'package:cake_wallet/store/app_store.dart';
|
import 'package:cake_wallet/store/app_store.dart';
|
||||||
import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
||||||
|
@ -8,30 +9,27 @@ import 'package:cw_core/wallet_type.dart';
|
||||||
|
|
||||||
Timer? _timer;
|
Timer? _timer;
|
||||||
|
|
||||||
Future<void> startFiatRateUpdate(AppStore appStore, SettingsStore settingsStore,
|
Future<void> startFiatRateUpdate(
|
||||||
FiatConversionStore fiatConversionStore) async {
|
AppStore appStore, SettingsStore settingsStore, FiatConversionStore fiatConversionStore) async {
|
||||||
if (_timer != null) {
|
if (_timer != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (appStore.wallet != null) {
|
_timer = Timer.periodic(Duration(seconds: 30), (_) async {
|
||||||
fiatConversionStore.prices[appStore.wallet!.currency] =
|
try {
|
||||||
await FiatConversionService.fetchPrice(
|
if (appStore.wallet == null || settingsStore.fiatApiMode == FiatApiMode.disabled) {
|
||||||
appStore.wallet!.currency, settingsStore.fiatCurrency);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_timer = Timer.periodic(
|
if (appStore.wallet!.type == WalletType.haven) {
|
||||||
Duration(seconds: 30),
|
await updateHavenRate(fiatConversionStore);
|
||||||
(_) async {
|
} else {
|
||||||
try {
|
fiatConversionStore.prices[appStore.wallet!.currency] =
|
||||||
if (appStore.wallet!.type == WalletType.haven) {
|
await FiatConversionService.fetchPrice(
|
||||||
await updateHavenRate(fiatConversionStore);
|
appStore.wallet!.currency, settingsStore.fiatCurrency);
|
||||||
} else {
|
}
|
||||||
fiatConversionStore.prices[appStore.wallet!.currency] = await FiatConversionService.fetchPrice(
|
} catch (e) {
|
||||||
appStore.wallet!.currency, settingsStore.fiatCurrency);
|
print(e);
|
||||||
}
|
}
|
||||||
} catch(e) {
|
});
|
||||||
print(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
import 'package:cake_wallet/core/fiat_conversion_service.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/dashboard/fiat_conversion_store.dart';
|
||||||
|
@ -12,7 +13,7 @@ void startCurrentFiatChangeReaction(AppStore appStore,
|
||||||
_onCurrentFiatCurrencyChangeDisposer?.reaction.dispose();
|
_onCurrentFiatCurrencyChangeDisposer?.reaction.dispose();
|
||||||
_onCurrentFiatCurrencyChangeDisposer = reaction(
|
_onCurrentFiatCurrencyChangeDisposer = reaction(
|
||||||
(_) => settingsStore.fiatCurrency, (FiatCurrency fiatCurrency) async {
|
(_) => settingsStore.fiatCurrency, (FiatCurrency fiatCurrency) async {
|
||||||
if (appStore.wallet == null) {
|
if (appStore.wallet == null || settingsStore.fiatApiMode == FiatApiMode.disabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||||
import 'package:cake_wallet/entities/fiat_currency.dart';
|
import 'package:cake_wallet/entities/fiat_currency.dart';
|
||||||
import 'package:cake_wallet/entities/update_haven_rate.dart';
|
import 'package:cake_wallet/entities/update_haven_rate.dart';
|
||||||
import 'package:cw_core/transaction_history.dart';
|
import 'package:cw_core/transaction_history.dart';
|
||||||
|
@ -87,7 +88,7 @@ void startCurrentWalletChangeReaction(AppStore appStore,
|
||||||
TransactionHistoryBase<TransactionInfo>, TransactionInfo>?
|
TransactionHistoryBase<TransactionInfo>, TransactionInfo>?
|
||||||
wallet) async {
|
wallet) async {
|
||||||
try {
|
try {
|
||||||
if (wallet == null) {
|
if (wallet == null || settingsStore.fiatApiMode == FiatApiMode.disabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,9 @@ class TransactionsPage extends StatelessWidget {
|
||||||
formattedDate: DateFormat('HH:mm')
|
formattedDate: DateFormat('HH:mm')
|
||||||
.format(transaction.date),
|
.format(transaction.date),
|
||||||
formattedAmount: item.formattedCryptoAmount,
|
formattedAmount: item.formattedCryptoAmount,
|
||||||
formattedFiatAmount: item.formattedFiatAmount,
|
formattedFiatAmount:
|
||||||
|
dashboardViewModel.balanceViewModel.isFiatDisabled
|
||||||
|
? '' : item.formattedFiatAmount,
|
||||||
isPending: transaction.isPending));
|
isPending: transaction.isPending));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -378,12 +378,10 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
actionLeftButton: () => Navigator.of(context).pop(),
|
actionLeftButton: () => Navigator.of(context).pop(),
|
||||||
feeFiatAmount: widget.exchangeTradeViewModel.sendViewModel.pendingTransactionFeeFiatAmount
|
feeFiatAmount: widget.exchangeTradeViewModel
|
||||||
+ ' ' + widget.exchangeTradeViewModel.sendViewModel.fiat.title,
|
.pendingTransactionFeeFiatAmountFormatted,
|
||||||
fiatAmountValue: widget.exchangeTradeViewModel.sendViewModel
|
fiatAmountValue: widget.exchangeTradeViewModel
|
||||||
.pendingTransactionFiatAmount +
|
.pendingTransactionFiatAmountValueFormatted,
|
||||||
' ' +
|
|
||||||
widget.exchangeTradeViewModel.sendViewModel.fiat.title,
|
|
||||||
outputs: widget.exchangeTradeViewModel.sendViewModel
|
outputs: widget.exchangeTradeViewModel.sendViewModel
|
||||||
.outputs);
|
.outputs);
|
||||||
});
|
});
|
||||||
|
|
|
@ -78,7 +78,14 @@ class _AdvancedPrivacySettingsBodyState extends State<AdvancedPrivacySettingsBod
|
||||||
children: [
|
children: [
|
||||||
LoadingPrimaryButton(
|
LoadingPrimaryButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.nodeViewModel.save(saveAsCurrent: true);
|
if (widget.privacySettingsViewModel.addCustomNode) {
|
||||||
|
if (_formKey.currentState != null && !_formKey.currentState!.validate()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
widget.nodeViewModel.save(saveAsCurrent: true);
|
||||||
|
}
|
||||||
|
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
text: S.of(context).continue_text,
|
text: S.of(context).continue_text,
|
||||||
|
|
|
@ -381,16 +381,10 @@ class SendPage extends BasePage {
|
||||||
amount: S.of(context).send_amount,
|
amount: S.of(context).send_amount,
|
||||||
amountValue:
|
amountValue:
|
||||||
sendViewModel.pendingTransaction!.amountFormatted,
|
sendViewModel.pendingTransaction!.amountFormatted,
|
||||||
fiatAmountValue:
|
fiatAmountValue: sendViewModel.pendingTransactionFiatAmountFormatted,
|
||||||
sendViewModel.pendingTransactionFiatAmount +
|
|
||||||
' ' +
|
|
||||||
sendViewModel.fiat.title,
|
|
||||||
fee: S.of(context).send_fee,
|
fee: S.of(context).send_fee,
|
||||||
feeValue: sendViewModel.pendingTransaction!.feeFormatted,
|
feeValue: sendViewModel.pendingTransaction!.feeFormatted,
|
||||||
feeFiatAmount:
|
feeFiatAmount: sendViewModel.pendingTransactionFeeFiatAmountFormatted,
|
||||||
sendViewModel.pendingTransactionFeeFiatAmount +
|
|
||||||
' ' +
|
|
||||||
sendViewModel.fiat.title,
|
|
||||||
outputs: sendViewModel.outputs,
|
outputs: sendViewModel.outputs,
|
||||||
rightButtonText: S.of(context).ok,
|
rightButtonText: S.of(context).ok,
|
||||||
leftButtonText: S.of(context).cancel,
|
leftButtonText: S.of(context).cancel,
|
||||||
|
|
|
@ -332,7 +332,8 @@ class SendCardState extends State<SendCard>
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
Padding(
|
if (!sendViewModel.isFiatDisabled)
|
||||||
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 20),
|
padding: const EdgeInsets.only(top: 20),
|
||||||
child: BaseTextFormField(
|
child: BaseTextFormField(
|
||||||
focusNode: fiatAmountFocus,
|
focusNode: fiatAmountFocus,
|
||||||
|
@ -438,8 +439,9 @@ class SendCardState extends State<SendCard>
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding:
|
||||||
EdgeInsets.only(top: 5),
|
EdgeInsets.only(top: 5),
|
||||||
child: Text(
|
child: sendViewModel.isFiatDisabled
|
||||||
output
|
? const SizedBox(height: 14)
|
||||||
|
: Text(output
|
||||||
.estimatedFeeFiatAmount
|
.estimatedFeeFiatAmount
|
||||||
+ ' ' +
|
+ ' ' +
|
||||||
sendViewModel
|
sendViewModel
|
||||||
|
|
|
@ -34,7 +34,8 @@ class DisplaySettingsPage extends BasePage {
|
||||||
onValueChange: (_, bool value) {
|
onValueChange: (_, bool value) {
|
||||||
_displaySettingsViewModel.setShouldDisplayBalance(value);
|
_displaySettingsViewModel.setShouldDisplayBalance(value);
|
||||||
}),
|
}),
|
||||||
if (!isHaven)
|
//if (!isHaven) it does not work correctly
|
||||||
|
if(!_displaySettingsViewModel.disabledFiatApiMode)
|
||||||
SettingsPickerCell<FiatCurrency>(
|
SettingsPickerCell<FiatCurrency>(
|
||||||
title: S.current.settings_currency,
|
title: S.current.settings_currency,
|
||||||
searchHintText: S.current.search_currency,
|
searchHintText: S.current.search_currency,
|
||||||
|
|
|
@ -18,10 +18,15 @@ class PrivacyPage extends BasePage {
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.only(top: 10),
|
padding: EdgeInsets.only(top: 10),
|
||||||
child: Observer(builder: (_) {
|
child: Observer(builder: (_) {
|
||||||
return Observer(builder: (_) {
|
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
SettingsSwitcherCell(
|
||||||
|
title: S.current.disable_fiat,
|
||||||
|
value: _privacySettingsViewModel.isFiatDisabled,
|
||||||
|
onValueChange: (BuildContext context, bool value) {
|
||||||
|
_privacySettingsViewModel.setFiatMode(value);
|
||||||
|
}),
|
||||||
SettingsSwitcherCell(
|
SettingsSwitcherCell(
|
||||||
title: S.current.disable_exchange,
|
title: S.current.disable_exchange,
|
||||||
value: _privacySettingsViewModel.disableExchange,
|
value: _privacySettingsViewModel.disableExchange,
|
||||||
|
@ -36,7 +41,6 @@ class PrivacyPage extends BasePage {
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ import 'package:cake_wallet/entities/fiat_currency.dart';
|
||||||
import 'package:cw_core/node.dart';
|
import 'package:cw_core/node.dart';
|
||||||
import 'package:cake_wallet/monero/monero.dart';
|
import 'package:cake_wallet/monero/monero.dart';
|
||||||
import 'package:cake_wallet/entities/action_list_display_mode.dart';
|
import 'package:cake_wallet/entities/action_list_display_mode.dart';
|
||||||
|
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||||
import 'package:cake_wallet/.secrets.g.dart' as secrets;
|
import 'package:cake_wallet/.secrets.g.dart' as secrets;
|
||||||
|
|
||||||
part 'settings_store.g.dart';
|
part 'settings_store.g.dart';
|
||||||
|
@ -28,6 +29,7 @@ abstract class SettingsStoreBase with Store {
|
||||||
required FiatCurrency initialFiatCurrency,
|
required FiatCurrency initialFiatCurrency,
|
||||||
required BalanceDisplayMode initialBalanceDisplayMode,
|
required BalanceDisplayMode initialBalanceDisplayMode,
|
||||||
required bool initialSaveRecipientAddress,
|
required bool initialSaveRecipientAddress,
|
||||||
|
required FiatApiMode initialFiatMode,
|
||||||
required bool initialAllowBiometricalAuthentication,
|
required bool initialAllowBiometricalAuthentication,
|
||||||
required bool initialExchangeEnabled,
|
required bool initialExchangeEnabled,
|
||||||
required ThemeBase initialTheme,
|
required ThemeBase initialTheme,
|
||||||
|
@ -40,12 +42,15 @@ abstract class SettingsStoreBase with Store {
|
||||||
required this.isBitcoinBuyEnabled,
|
required this.isBitcoinBuyEnabled,
|
||||||
required this.actionlistDisplayMode,
|
required this.actionlistDisplayMode,
|
||||||
TransactionPriority? initialBitcoinTransactionPriority,
|
TransactionPriority? initialBitcoinTransactionPriority,
|
||||||
TransactionPriority? initialMoneroTransactionPriority})
|
TransactionPriority? initialMoneroTransactionPriority,
|
||||||
|
TransactionPriority? initialHavenTransactionPriority,
|
||||||
|
TransactionPriority? initialLitecoinTransactionPriority})
|
||||||
: nodes = ObservableMap<WalletType, Node>.of(nodes),
|
: nodes = ObservableMap<WalletType, Node>.of(nodes),
|
||||||
_sharedPreferences = sharedPreferences,
|
_sharedPreferences = sharedPreferences,
|
||||||
fiatCurrency = initialFiatCurrency,
|
fiatCurrency = initialFiatCurrency,
|
||||||
balanceDisplayMode = initialBalanceDisplayMode,
|
balanceDisplayMode = initialBalanceDisplayMode,
|
||||||
shouldSaveRecipientAddress = initialSaveRecipientAddress,
|
shouldSaveRecipientAddress = initialSaveRecipientAddress,
|
||||||
|
fiatApiMode = initialFiatMode,
|
||||||
allowBiometricalAuthentication = initialAllowBiometricalAuthentication,
|
allowBiometricalAuthentication = initialAllowBiometricalAuthentication,
|
||||||
disableExchange = initialExchangeEnabled,
|
disableExchange = initialExchangeEnabled,
|
||||||
currentTheme = initialTheme,
|
currentTheme = initialTheme,
|
||||||
|
@ -62,6 +67,14 @@ abstract class SettingsStoreBase with Store {
|
||||||
priority[WalletType.bitcoin] = initialBitcoinTransactionPriority;
|
priority[WalletType.bitcoin] = initialBitcoinTransactionPriority;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (initialHavenTransactionPriority != null) {
|
||||||
|
priority[WalletType.haven] = initialHavenTransactionPriority;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (initialLitecoinTransactionPriority != null) {
|
||||||
|
priority[WalletType.litecoin] = initialLitecoinTransactionPriority;
|
||||||
|
}
|
||||||
|
|
||||||
reaction(
|
reaction(
|
||||||
(_) => fiatCurrency,
|
(_) => fiatCurrency,
|
||||||
(FiatCurrency fiatCurrency) => sharedPreferences.setString(
|
(FiatCurrency fiatCurrency) => sharedPreferences.setString(
|
||||||
|
@ -73,11 +86,25 @@ abstract class SettingsStoreBase with Store {
|
||||||
.setBool(PreferencesKey.shouldShowYatPopup, shouldShowYatPopup));
|
.setBool(PreferencesKey.shouldShowYatPopup, shouldShowYatPopup));
|
||||||
|
|
||||||
priority.observe((change) {
|
priority.observe((change) {
|
||||||
final key = change.key == WalletType.monero
|
final String? key;
|
||||||
? PreferencesKey.moneroTransactionPriority
|
switch (change.key) {
|
||||||
: PreferencesKey.bitcoinTransactionPriority;
|
case WalletType.monero:
|
||||||
|
key = PreferencesKey.moneroTransactionPriority;
|
||||||
|
break;
|
||||||
|
case WalletType.bitcoin:
|
||||||
|
key = PreferencesKey.bitcoinTransactionPriority;
|
||||||
|
break;
|
||||||
|
case WalletType.litecoin:
|
||||||
|
key = PreferencesKey.litecoinTransactionPriority;
|
||||||
|
break;
|
||||||
|
case WalletType.haven:
|
||||||
|
key = PreferencesKey.havenTransactionPriority;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
key = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (change.newValue != null) {
|
if (change.newValue != null && key != null) {
|
||||||
sharedPreferences.setInt(key, change.newValue!.serialize());
|
sharedPreferences.setInt(key, change.newValue!.serialize());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -88,6 +115,11 @@ abstract class SettingsStoreBase with Store {
|
||||||
PreferencesKey.shouldSaveRecipientAddressKey,
|
PreferencesKey.shouldSaveRecipientAddressKey,
|
||||||
shouldSaveRecipientAddress));
|
shouldSaveRecipientAddress));
|
||||||
|
|
||||||
|
reaction(
|
||||||
|
(_) => fiatApiMode,
|
||||||
|
(FiatApiMode mode) => sharedPreferences.setInt(
|
||||||
|
PreferencesKey.currentFiatApiModeKey, mode.serialize()));
|
||||||
|
|
||||||
reaction(
|
reaction(
|
||||||
(_) => currentTheme,
|
(_) => currentTheme,
|
||||||
(ThemeBase theme) =>
|
(ThemeBase theme) =>
|
||||||
|
@ -143,6 +175,9 @@ abstract class SettingsStoreBase with Store {
|
||||||
@observable
|
@observable
|
||||||
BalanceDisplayMode balanceDisplayMode;
|
BalanceDisplayMode balanceDisplayMode;
|
||||||
|
|
||||||
|
@observable
|
||||||
|
FiatApiMode fiatApiMode;
|
||||||
|
|
||||||
@observable
|
@observable
|
||||||
bool shouldSaveRecipientAddress;
|
bool shouldSaveRecipientAddress;
|
||||||
|
|
||||||
|
@ -194,39 +229,48 @@ abstract class SettingsStoreBase with Store {
|
||||||
static Future<SettingsStore> load(
|
static Future<SettingsStore> load(
|
||||||
{required Box<Node> nodeSource,
|
{required Box<Node> nodeSource,
|
||||||
required bool isBitcoinBuyEnabled,
|
required bool isBitcoinBuyEnabled,
|
||||||
TransactionPriority? initialMoneroTransactionPriority,
|
|
||||||
TransactionPriority? initialBitcoinTransactionPriority,
|
|
||||||
FiatCurrency initialFiatCurrency = FiatCurrency.usd,
|
FiatCurrency initialFiatCurrency = FiatCurrency.usd,
|
||||||
BalanceDisplayMode initialBalanceDisplayMode =
|
BalanceDisplayMode initialBalanceDisplayMode =
|
||||||
BalanceDisplayMode.availableBalance}) async {
|
BalanceDisplayMode.availableBalance}) async {
|
||||||
if (initialBitcoinTransactionPriority == null) {
|
|
||||||
initialBitcoinTransactionPriority = bitcoin?.getMediumTransactionPriority();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (initialMoneroTransactionPriority == null) {
|
|
||||||
initialMoneroTransactionPriority = monero?.getDefaultTransactionPriority();
|
|
||||||
}
|
|
||||||
|
|
||||||
final sharedPreferences = await getIt.getAsync<SharedPreferences>();
|
final sharedPreferences = await getIt.getAsync<SharedPreferences>();
|
||||||
final currentFiatCurrency = FiatCurrency.deserialize(raw:
|
final currentFiatCurrency = FiatCurrency.deserialize(raw:
|
||||||
sharedPreferences.getString(PreferencesKey.currentFiatCurrencyKey)!);
|
sharedPreferences.getString(PreferencesKey.currentFiatCurrencyKey)!);
|
||||||
final savedMoneroTransactionPriority =
|
|
||||||
|
TransactionPriority? moneroTransactionPriority =
|
||||||
monero?.deserializeMoneroTransactionPriority(
|
monero?.deserializeMoneroTransactionPriority(
|
||||||
raw: sharedPreferences
|
raw: sharedPreferences
|
||||||
.getInt(PreferencesKey.moneroTransactionPriority)!);
|
.getInt(PreferencesKey.moneroTransactionPriority)!);
|
||||||
final savedBitcoinTransactionPriority =
|
TransactionPriority? bitcoinTransactionPriority =
|
||||||
bitcoin?.deserializeBitcoinTransactionPriority(sharedPreferences
|
bitcoin?.deserializeBitcoinTransactionPriority(sharedPreferences
|
||||||
.getInt(PreferencesKey.bitcoinTransactionPriority)!);
|
.getInt(PreferencesKey.bitcoinTransactionPriority)!);
|
||||||
final moneroTransactionPriority =
|
|
||||||
savedMoneroTransactionPriority ?? initialMoneroTransactionPriority;
|
TransactionPriority? havenTransactionPriority;
|
||||||
final bitcoinTransactionPriority =
|
TransactionPriority? litecoinTransactionPriority;
|
||||||
savedBitcoinTransactionPriority ?? initialBitcoinTransactionPriority;
|
|
||||||
|
if (sharedPreferences.getInt(PreferencesKey.havenTransactionPriority) != null) {
|
||||||
|
havenTransactionPriority = monero?.deserializeMoneroTransactionPriority(
|
||||||
|
raw: sharedPreferences.getInt(PreferencesKey.havenTransactionPriority)!);
|
||||||
|
}
|
||||||
|
if (sharedPreferences.getInt(PreferencesKey.litecoinTransactionPriority) != null) {
|
||||||
|
litecoinTransactionPriority = bitcoin?.deserializeLitecoinTransactionPriority(
|
||||||
|
sharedPreferences.getInt(PreferencesKey.litecoinTransactionPriority)!);
|
||||||
|
}
|
||||||
|
|
||||||
|
moneroTransactionPriority ??= monero?.getDefaultTransactionPriority();
|
||||||
|
bitcoinTransactionPriority ??= bitcoin?.getMediumTransactionPriority();
|
||||||
|
havenTransactionPriority ??= monero?.getDefaultTransactionPriority();
|
||||||
|
litecoinTransactionPriority ??= bitcoin?.getLitecoinTransactionPriorityMedium();
|
||||||
|
|
||||||
final currentBalanceDisplayMode = BalanceDisplayMode.deserialize(
|
final currentBalanceDisplayMode = BalanceDisplayMode.deserialize(
|
||||||
raw: sharedPreferences
|
raw: sharedPreferences
|
||||||
.getInt(PreferencesKey.currentBalanceDisplayModeKey)!);
|
.getInt(PreferencesKey.currentBalanceDisplayModeKey)!);
|
||||||
// FIX-ME: Check for which default value we should have here
|
// FIX-ME: Check for which default value we should have here
|
||||||
final shouldSaveRecipientAddress =
|
final shouldSaveRecipientAddress =
|
||||||
sharedPreferences.getBool(PreferencesKey.shouldSaveRecipientAddressKey) ?? false;
|
sharedPreferences.getBool(PreferencesKey.shouldSaveRecipientAddressKey) ?? false;
|
||||||
|
final currentFiatApiMode = FiatApiMode.deserialize(
|
||||||
|
raw: sharedPreferences
|
||||||
|
.getInt(PreferencesKey.currentFiatApiModeKey) ?? FiatApiMode.enabled.raw);
|
||||||
final allowBiometricalAuthentication = sharedPreferences
|
final allowBiometricalAuthentication = sharedPreferences
|
||||||
.getBool(PreferencesKey.allowBiometricalAuthenticationKey) ??
|
.getBool(PreferencesKey.allowBiometricalAuthenticationKey) ??
|
||||||
false;
|
false;
|
||||||
|
@ -293,6 +337,7 @@ abstract class SettingsStoreBase with Store {
|
||||||
initialFiatCurrency: currentFiatCurrency,
|
initialFiatCurrency: currentFiatCurrency,
|
||||||
initialBalanceDisplayMode: currentBalanceDisplayMode,
|
initialBalanceDisplayMode: currentBalanceDisplayMode,
|
||||||
initialSaveRecipientAddress: shouldSaveRecipientAddress,
|
initialSaveRecipientAddress: shouldSaveRecipientAddress,
|
||||||
|
initialFiatMode: currentFiatApiMode,
|
||||||
initialAllowBiometricalAuthentication: allowBiometricalAuthentication,
|
initialAllowBiometricalAuthentication: allowBiometricalAuthentication,
|
||||||
initialExchangeEnabled: disableExchange,
|
initialExchangeEnabled: disableExchange,
|
||||||
initialTheme: savedTheme,
|
initialTheme: savedTheme,
|
||||||
|
@ -301,6 +346,8 @@ abstract class SettingsStoreBase with Store {
|
||||||
initialLanguageCode: savedLanguageCode,
|
initialLanguageCode: savedLanguageCode,
|
||||||
initialMoneroTransactionPriority: moneroTransactionPriority,
|
initialMoneroTransactionPriority: moneroTransactionPriority,
|
||||||
initialBitcoinTransactionPriority: bitcoinTransactionPriority,
|
initialBitcoinTransactionPriority: bitcoinTransactionPriority,
|
||||||
|
initialHavenTransactionPriority: havenTransactionPriority,
|
||||||
|
initialLitecoinTransactionPriority: litecoinTransactionPriority,
|
||||||
shouldShowYatPopup: shouldShowYatPopup);
|
shouldShowYatPopup: shouldShowYatPopup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||||
import 'package:cake_wallet/store/settings_store.dart';
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
import 'package:cake_wallet/view_model/settings/switcher_list_item.dart';
|
import 'package:cake_wallet/view_model/settings/switcher_list_item.dart';
|
||||||
import 'package:cw_core/wallet_type.dart';
|
import 'package:cw_core/wallet_type.dart';
|
||||||
|
@ -11,15 +12,13 @@ class AdvancedPrivacySettingsViewModel = AdvancedPrivacySettingsViewModelBase
|
||||||
|
|
||||||
abstract class AdvancedPrivacySettingsViewModelBase with Store {
|
abstract class AdvancedPrivacySettingsViewModelBase with Store {
|
||||||
AdvancedPrivacySettingsViewModelBase(this.type, this._settingsStore)
|
AdvancedPrivacySettingsViewModelBase(this.type, this._settingsStore)
|
||||||
: _disableFiat = false,
|
: _addCustomNode = false {
|
||||||
_addCustomNode = false {
|
|
||||||
settings = [
|
settings = [
|
||||||
// TODO: uncomment when Disable Fiat PR is merged
|
SwitcherListItem(
|
||||||
// SwitcherListItem(
|
title: S.current.disable_fiat,
|
||||||
// title: S.current.disable_fiat,
|
value: () => _settingsStore.fiatApiMode == FiatApiMode.disabled,
|
||||||
// value: () => _disableFiat,
|
onValueChange: (_, bool value) => setFiatMode(value),
|
||||||
// onValueChange: (_, bool value) => _disableFiat = value,
|
),
|
||||||
// ),
|
|
||||||
SwitcherListItem(
|
SwitcherListItem(
|
||||||
title: S.current.disable_exchange,
|
title: S.current.disable_exchange,
|
||||||
value: () => _settingsStore.disableExchange,
|
value: () => _settingsStore.disableExchange,
|
||||||
|
@ -37,9 +36,6 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
|
||||||
|
|
||||||
late List<SwitcherListItem> settings;
|
late List<SwitcherListItem> settings;
|
||||||
|
|
||||||
@observable
|
|
||||||
bool _disableFiat = false;
|
|
||||||
|
|
||||||
@observable
|
@observable
|
||||||
bool _addCustomNode = false;
|
bool _addCustomNode = false;
|
||||||
|
|
||||||
|
@ -48,4 +44,13 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
|
||||||
|
|
||||||
@computed
|
@computed
|
||||||
bool get addCustomNode => _addCustomNode;
|
bool get addCustomNode => _addCustomNode;
|
||||||
|
|
||||||
|
@action
|
||||||
|
void setFiatMode(bool value) {
|
||||||
|
if (value) {
|
||||||
|
_settingsStore.fiatApiMode = FiatApiMode.disabled;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_settingsStore.fiatApiMode = FiatApiMode.enabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||||
import 'package:cw_core/transaction_history.dart';
|
import 'package:cw_core/transaction_history.dart';
|
||||||
import 'package:cw_core/wallet_base.dart';
|
import 'package:cw_core/wallet_base.dart';
|
||||||
import 'package:cw_core/balance.dart';
|
import 'package:cw_core/balance.dart';
|
||||||
|
@ -10,7 +11,6 @@ import 'package:cake_wallet/entities/calculate_fiat_amount.dart';
|
||||||
import 'package:cake_wallet/store/app_store.dart';
|
import 'package:cake_wallet/store/app_store.dart';
|
||||||
import 'package:cake_wallet/store/settings_store.dart';
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
|
||||||
part 'balance_view_model.g.dart';
|
part 'balance_view_model.g.dart';
|
||||||
|
@ -71,6 +71,9 @@ abstract class BalanceViewModelBase with Store {
|
||||||
@computed
|
@computed
|
||||||
BalanceDisplayMode get savedDisplayMode => settingsStore.balanceDisplayMode;
|
BalanceDisplayMode get savedDisplayMode => settingsStore.balanceDisplayMode;
|
||||||
|
|
||||||
|
@computed
|
||||||
|
bool get isFiatDisabled => settingsStore.fiatApiMode == FiatApiMode.disabled;
|
||||||
|
|
||||||
@computed
|
@computed
|
||||||
String get asset {
|
String get asset {
|
||||||
final typeFormatted = walletTypeToString(appStore.wallet!.type);
|
final typeFormatted = walletTypeToString(appStore.wallet!.type);
|
||||||
|
@ -180,8 +183,8 @@ abstract class BalanceViewModelBase with Store {
|
||||||
return MapEntry(key, BalanceRecord(
|
return MapEntry(key, BalanceRecord(
|
||||||
availableBalance: '---',
|
availableBalance: '---',
|
||||||
additionalBalance: '---',
|
additionalBalance: '---',
|
||||||
fiatAdditionalBalance: '---',
|
fiatAdditionalBalance: isFiatDisabled ? '' : '---',
|
||||||
fiatAvailableBalance: '---',
|
fiatAvailableBalance: isFiatDisabled ? '' : '---',
|
||||||
asset: key,
|
asset: key,
|
||||||
formattedAssetTitle: _formatterAsset(key)));
|
formattedAssetTitle: _formatterAsset(key)));
|
||||||
}
|
}
|
||||||
|
@ -192,17 +195,17 @@ abstract class BalanceViewModelBase with Store {
|
||||||
// throw Exception('Price is null for: $key');
|
// throw Exception('Price is null for: $key');
|
||||||
// }
|
// }
|
||||||
|
|
||||||
final additionalFiatBalance = fiatCurrency.toString()
|
final additionalFiatBalance = isFiatDisabled ? '' : (fiatCurrency.toString()
|
||||||
+ ' '
|
+ ' '
|
||||||
+ _getFiatBalance(
|
+ _getFiatBalance(
|
||||||
price: price,
|
price: price,
|
||||||
cryptoAmount: value.formattedAdditionalBalance);
|
cryptoAmount: value.formattedAdditionalBalance));
|
||||||
|
|
||||||
final availableFiatBalance = fiatCurrency.toString()
|
final availableFiatBalance = isFiatDisabled ? '' : (fiatCurrency.toString()
|
||||||
+ ' '
|
+ ' '
|
||||||
+ _getFiatBalance(
|
+ _getFiatBalance(
|
||||||
price: price,
|
price: price,
|
||||||
cryptoAmount: value.formattedAvailableBalance);
|
cryptoAmount: value.formattedAvailableBalance));
|
||||||
|
|
||||||
return MapEntry(key, BalanceRecord(
|
return MapEntry(key, BalanceRecord(
|
||||||
availableBalance: value.formattedAvailableBalance,
|
availableBalance: value.formattedAvailableBalance,
|
||||||
|
|
|
@ -72,6 +72,18 @@ abstract class ExchangeTradeViewModelBase with Store {
|
||||||
? '\n\n' + S.current.xrp_extra_info
|
? '\n\n' + S.current.xrp_extra_info
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
|
@computed
|
||||||
|
String get pendingTransactionFiatAmountValueFormatted =>
|
||||||
|
sendViewModel.isFiatDisabled
|
||||||
|
? '' : sendViewModel.pendingTransactionFiatAmount
|
||||||
|
+ ' ' + sendViewModel.fiat.title;
|
||||||
|
|
||||||
|
@computed
|
||||||
|
String get pendingTransactionFeeFiatAmountFormatted =>
|
||||||
|
sendViewModel.isFiatDisabled
|
||||||
|
? '' : sendViewModel.pendingTransactionFeeFiatAmount
|
||||||
|
+ ' ' + sendViewModel.fiat.title;
|
||||||
|
|
||||||
@observable
|
@observable
|
||||||
ObservableList<ExchangeTradeItem> items;
|
ObservableList<ExchangeTradeItem> items;
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,19 @@ abstract class SendViewModelBase with Store {
|
||||||
@computed
|
@computed
|
||||||
String get balance => balanceViewModel.availableBalance;
|
String get balance => balanceViewModel.availableBalance;
|
||||||
|
|
||||||
|
@computed
|
||||||
|
bool get isFiatDisabled => balanceViewModel.isFiatDisabled;
|
||||||
|
|
||||||
|
@computed
|
||||||
|
String get pendingTransactionFiatAmountFormatted =>
|
||||||
|
isFiatDisabled ? '' : pendingTransactionFiatAmount +
|
||||||
|
' ' + fiat.title;
|
||||||
|
|
||||||
|
@computed
|
||||||
|
String get pendingTransactionFeeFiatAmountFormatted =>
|
||||||
|
isFiatDisabled ? '' : pendingTransactionFeeFiatAmount +
|
||||||
|
' ' + fiat.title;
|
||||||
|
|
||||||
@computed
|
@computed
|
||||||
bool get isReadyForSend => _wallet.syncStatus is SyncedSyncStatus;
|
bool get isReadyForSend => _wallet.syncStatus is SyncedSyncStatus;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'package:cake_wallet/entities/fiat_currency.dart';
|
||||||
import 'package:cake_wallet/store/settings_store.dart';
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
import 'package:cake_wallet/themes/theme_base.dart';
|
import 'package:cake_wallet/themes/theme_base.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||||
|
|
||||||
part 'display_settings_view_model.g.dart';
|
part 'display_settings_view_model.g.dart';
|
||||||
|
|
||||||
|
@ -30,6 +31,9 @@ abstract class DisplaySettingsViewModelBase with Store {
|
||||||
@computed
|
@computed
|
||||||
ThemeBase get theme => _settingsStore.currentTheme;
|
ThemeBase get theme => _settingsStore.currentTheme;
|
||||||
|
|
||||||
|
@computed
|
||||||
|
bool get disabledFiatApiMode => _settingsStore.fiatApiMode == FiatApiMode.disabled;
|
||||||
|
|
||||||
@action
|
@action
|
||||||
void setBalanceDisplayMode(BalanceDisplayMode value) => _settingsStore.balanceDisplayMode = value;
|
void setBalanceDisplayMode(BalanceDisplayMode value) => _settingsStore.balanceDisplayMode = value;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:cake_wallet/store/settings_store.dart';
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||||
|
|
||||||
part 'privacy_settings_view_model.g.dart';
|
part 'privacy_settings_view_model.g.dart';
|
||||||
|
|
||||||
|
@ -16,9 +17,22 @@ abstract class PrivacySettingsViewModelBase with Store {
|
||||||
@computed
|
@computed
|
||||||
bool get shouldSaveRecipientAddress => _settingsStore.shouldSaveRecipientAddress;
|
bool get shouldSaveRecipientAddress => _settingsStore.shouldSaveRecipientAddress;
|
||||||
|
|
||||||
|
@computed
|
||||||
|
bool get isFiatDisabled => _settingsStore.fiatApiMode == FiatApiMode.disabled;
|
||||||
|
|
||||||
@action
|
@action
|
||||||
void setShouldSaveRecipientAddress(bool value) => _settingsStore.shouldSaveRecipientAddress = value;
|
void setShouldSaveRecipientAddress(bool value) => _settingsStore.shouldSaveRecipientAddress = value;
|
||||||
|
|
||||||
@action
|
@action
|
||||||
void setEnableExchange(bool value) => _settingsStore.disableExchange = value;
|
void setEnableExchange(bool value) => _settingsStore.disableExchange = value;
|
||||||
|
|
||||||
|
@action
|
||||||
|
void setFiatMode(bool value) {
|
||||||
|
if (value) {
|
||||||
|
_settingsStore.fiatApiMode = FiatApiMode.disabled;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_settingsStore.fiatApiMode = FiatApiMode.enabled;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "Sie verwenden derzeit eine niedrige Netzwerkgebührenpriorität. Dies kann zu langen Wartezeiten, unterschiedlichen Kursen oder stornierten Trades führen. Wir empfehlen, für ein besseres Erlebnis eine höhere Gebühr festzulegen.",
|
"low_fee_alert": "Sie verwenden derzeit eine niedrige Netzwerkgebührenpriorität. Dies kann zu langen Wartezeiten, unterschiedlichen Kursen oder stornierten Trades führen. Wir empfehlen, für ein besseres Erlebnis eine höhere Gebühr festzulegen.",
|
||||||
"ignor": "Ignorieren",
|
"ignor": "Ignorieren",
|
||||||
"use_suggested": "Vorgeschlagen verwenden",
|
"use_suggested": "Vorgeschlagen verwenden",
|
||||||
"do_not_share_warning_text" : "Teilen Sie diese nicht mit anderen, einschließlich des Supports.\n\nSie werden Ihr Geld stehlen!",
|
"do_not_share_warning_text" : "Teilen Sie diese nicht mit anderen, einschließlich Support.\n\nIhr Geld kann und wird gestohlen werden!",
|
||||||
"help": "hilfe",
|
"help": "hilfe",
|
||||||
"connection_sync": "Verbindung und Synchronisierung",
|
"connection_sync": "Verbindung und Synchronisierung",
|
||||||
"security_and_backup": "Sicherheit und Datensicherung",
|
"security_and_backup": "Sicherheit und Datensicherung",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "Exchange deaktivieren",
|
"disable_exchange": "Exchange deaktivieren",
|
||||||
"advanced_privacy_settings": "Erweiterte Datenschutzeinstellungen",
|
"advanced_privacy_settings": "Erweiterte Datenschutzeinstellungen",
|
||||||
"settings_can_be_changed_later": "Diese Einstellungen können später in den App-Einstellungen geändert werden",
|
"settings_can_be_changed_later": "Diese Einstellungen können später in den App-Einstellungen geändert werden",
|
||||||
"add_custom_node": "Neuen benutzerdefinierten Knoten hinzufügen"
|
"add_custom_node": "Neuen benutzerdefinierten Knoten hinzufügen",
|
||||||
|
"disable_fiat": "Fiat deaktivieren",
|
||||||
|
"fiat_api": "Fiat API",
|
||||||
|
"disabled": "Deaktiviert",
|
||||||
|
"enabled": "Ermöglicht",
|
||||||
|
"tor_only": "Nur Tor"
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "You currently are using a low network fee priority. This could cause long waits, different rates, or canceled trades. We recommend setting a higher fee for a better experience.",
|
"low_fee_alert": "You currently are using a low network fee priority. This could cause long waits, different rates, or canceled trades. We recommend setting a higher fee for a better experience.",
|
||||||
"ignor": "Ignore",
|
"ignor": "Ignore",
|
||||||
"use_suggested": "Use Suggested",
|
"use_suggested": "Use Suggested",
|
||||||
"do_not_share_warning_text" : "Do not share these with anyone else, including support.\n\nThey will steal your money!",
|
"do_not_share_warning_text" : "Do not share these with anyone else, including support.\n\nYour funds can and will be stolen!",
|
||||||
"help": "help",
|
"help": "help",
|
||||||
"connection_sync": "Connection and sync",
|
"connection_sync": "Connection and sync",
|
||||||
"security_and_backup": "Security and backup",
|
"security_and_backup": "Security and backup",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "Disable exchange",
|
"disable_exchange": "Disable exchange",
|
||||||
"advanced_privacy_settings": "Advanced Privacy Settings",
|
"advanced_privacy_settings": "Advanced Privacy Settings",
|
||||||
"settings_can_be_changed_later": "These settings can be changed later in the app settings",
|
"settings_can_be_changed_later": "These settings can be changed later in the app settings",
|
||||||
"add_custom_node": "Add New Custom Node"
|
"add_custom_node": "Add New Custom Node",
|
||||||
|
"disable_fiat": "Disable fiat",
|
||||||
|
"fiat_api": "Fiat API",
|
||||||
|
"disabled": "Disabled",
|
||||||
|
"enabled": "Enabled",
|
||||||
|
"tor_only": "Tor only"
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "Actualmente está utilizando una prioridad de tarifa de red baja. Esto podría causar largas esperas, tarifas diferentes o transacciones canceladas. Recomendamos establecer una tarifa más alta para una mejor experiencia.",
|
"low_fee_alert": "Actualmente está utilizando una prioridad de tarifa de red baja. Esto podría causar largas esperas, tarifas diferentes o transacciones canceladas. Recomendamos establecer una tarifa más alta para una mejor experiencia.",
|
||||||
"ignor": "Pasar por alto",
|
"ignor": "Pasar por alto",
|
||||||
"use_suggested": "Usar sugerido",
|
"use_suggested": "Usar sugerido",
|
||||||
"do_not_share_warning_text" : "No comparta estos con nadie más, incluido el soporte.\n\n¡Te robarán tu dinero!",
|
"do_not_share_warning_text" : "No comparta estos con nadie más, incluido el soporte.\n\n¡Sus fondos pueden ser y serán robados!",
|
||||||
"help": "ayuda",
|
"help": "ayuda",
|
||||||
"connection_sync": "Conexión y sincronización",
|
"connection_sync": "Conexión y sincronización",
|
||||||
"security_and_backup": "Seguridad y respaldo",
|
"security_and_backup": "Seguridad y respaldo",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "Deshabilitar intercambio",
|
"disable_exchange": "Deshabilitar intercambio",
|
||||||
"advanced_privacy_settings": "Configuración avanzada de privacidad",
|
"advanced_privacy_settings": "Configuración avanzada de privacidad",
|
||||||
"settings_can_be_changed_later": "Estas configuraciones se pueden cambiar más tarde en la configuración de la aplicación",
|
"settings_can_be_changed_later": "Estas configuraciones se pueden cambiar más tarde en la configuración de la aplicación",
|
||||||
"add_custom_node": "Agregar nuevo nodo personalizado"
|
"add_custom_node": "Agregar nuevo nodo personalizado",
|
||||||
|
"disable_fiat": "Deshabilitar fiat",
|
||||||
|
"fiat_api": "Fiat API",
|
||||||
|
"disabled": "Desactivado",
|
||||||
|
"enabled": "Activado",
|
||||||
|
"tor_only": "solo Tor"
|
||||||
}
|
}
|
||||||
|
|
|
@ -650,7 +650,7 @@
|
||||||
"low_fee_alert": "Vous utilisez actuellement une priorité de frais de réseau peu élevés. Cela pourrait entraîner de longues attentes, des taux différents ou des transactions annulées. Nous vous recommandons de fixer des frais plus élevés pour une meilleure expérience.",
|
"low_fee_alert": "Vous utilisez actuellement une priorité de frais de réseau peu élevés. Cela pourrait entraîner de longues attentes, des taux différents ou des transactions annulées. Nous vous recommandons de fixer des frais plus élevés pour une meilleure expérience.",
|
||||||
"ignor": "Ignorer",
|
"ignor": "Ignorer",
|
||||||
"use_suggested": "Utilisation suggérée",
|
"use_suggested": "Utilisation suggérée",
|
||||||
"do_not_share_warning_text" : "Ne les partagez avec personne d'autre, y compris avec l'assistance.\n\nIls vont voler votre argent!",
|
"do_not_share_warning_text" : "Ne les partagez avec personne d'autre, y compris avec l'assistance.\n\nVos fonds peuvent et seront volés!",
|
||||||
"help": "aider",
|
"help": "aider",
|
||||||
"connection_sync": "Connexion et synchronisation",
|
"connection_sync": "Connexion et synchronisation",
|
||||||
"security_and_backup": "Sécurité et sauvegarde",
|
"security_and_backup": "Sécurité et sauvegarde",
|
||||||
|
@ -662,5 +662,10 @@
|
||||||
"disable_exchange": "Désactiver l'échange",
|
"disable_exchange": "Désactiver l'échange",
|
||||||
"advanced_privacy_settings": "Paramètres de confidentialité avancés",
|
"advanced_privacy_settings": "Paramètres de confidentialité avancés",
|
||||||
"settings_can_be_changed_later": "Ces paramètres peuvent être modifiés ultérieurement dans les paramètres de l'application",
|
"settings_can_be_changed_later": "Ces paramètres peuvent être modifiés ultérieurement dans les paramètres de l'application",
|
||||||
"add_custom_node": "Ajouter un nouveau nœud personnalisé"
|
"add_custom_node": "Ajouter un nouveau nœud personnalisé",
|
||||||
|
"disable_fiat": "Désactiver fiat",
|
||||||
|
"fiat_api": "Fiat API",
|
||||||
|
"disabled": "Handicapé",
|
||||||
|
"enabled": "Activé",
|
||||||
|
"tor_only": "Tor uniquement"
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "आप वर्तमान में कम नेटवर्क शुल्क प्राथमिकता का उपयोग कर रहे हैं। यह लंबे इंतजार, अलग-अलग दरों या रद्द किए गए ट्रेडों का कारण बन सकता है। हम बेहतर अनुभव के लिए अधिक शुल्क निर्धारित करने की सलाह देते हैं।",
|
"low_fee_alert": "आप वर्तमान में कम नेटवर्क शुल्क प्राथमिकता का उपयोग कर रहे हैं। यह लंबे इंतजार, अलग-अलग दरों या रद्द किए गए ट्रेडों का कारण बन सकता है। हम बेहतर अनुभव के लिए अधिक शुल्क निर्धारित करने की सलाह देते हैं।",
|
||||||
"ignor": "नज़रअंदाज़ करना",
|
"ignor": "नज़रअंदाज़ करना",
|
||||||
"use_suggested": "सुझाए गए का प्रयोग करें",
|
"use_suggested": "सुझाए गए का प्रयोग करें",
|
||||||
"do_not_share_warning_text" : "इन्हें समर्थन सहित किसी और के साथ साझा न करें।\n\nवे आपका पैसा चुरा लेंगे!",
|
"do_not_share_warning_text" : "समर्थन सहित, इन्हें किसी और के साथ साझा न करें।\n\nआपके धन की चोरी हो सकती है और होगी!",
|
||||||
"help": "मदद करना",
|
"help": "मदद करना",
|
||||||
"connection_sync": "कनेक्शन और सिंक",
|
"connection_sync": "कनेक्शन और सिंक",
|
||||||
"security_and_backup": "सुरक्षा और बैकअप",
|
"security_and_backup": "सुरक्षा और बैकअप",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "एक्सचेंज अक्षम करें",
|
"disable_exchange": "एक्सचेंज अक्षम करें",
|
||||||
"advanced_privacy_settings": "उन्नत गोपनीयता सेटिंग्स",
|
"advanced_privacy_settings": "उन्नत गोपनीयता सेटिंग्स",
|
||||||
"settings_can_be_changed_later": "इन सेटिंग्स को बाद में ऐप सेटिंग में बदला जा सकता है",
|
"settings_can_be_changed_later": "इन सेटिंग्स को बाद में ऐप सेटिंग में बदला जा सकता है",
|
||||||
"add_custom_node": "नया कस्टम नोड जोड़ें"
|
"add_custom_node": "नया कस्टम नोड जोड़ें",
|
||||||
|
"disable_exchange": "एक्सचेंज अक्षम करें",
|
||||||
|
"fiat_api": "फिएट पैसे API",
|
||||||
|
"disabled": "अक्षम",
|
||||||
|
"enabled": "सक्रिय",
|
||||||
|
"tor_only": "Tor केवल"
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "Trenutačno koristite niski prioritet mrežne naknade. To bi moglo uzrokovati duga čekanja, različite tečajeve ili otkazane trgovine. Preporučujemo postavljanje veće naknade za bolje iskustvo.",
|
"low_fee_alert": "Trenutačno koristite niski prioritet mrežne naknade. To bi moglo uzrokovati duga čekanja, različite tečajeve ili otkazane trgovine. Preporučujemo postavljanje veće naknade za bolje iskustvo.",
|
||||||
"ignor": "Zanemariti",
|
"ignor": "Zanemariti",
|
||||||
"use_suggested": "Koristite predloženo",
|
"use_suggested": "Koristite predloženo",
|
||||||
"do_not_share_warning_text" : "Nemojte ih dijeliti ni s kim, uključujući podršku.\n\nUkrast će vam novac!",
|
"do_not_share_warning_text" : "Nemojte ih dijeliti ni s kim, uključujući podršku.\n\nVaša sredstva mogu i bit će ukradena!",
|
||||||
"help": "pomozite",
|
"help": "pomozite",
|
||||||
"connection_sync": "Povezivanje i sinkronizacija",
|
"connection_sync": "Povezivanje i sinkronizacija",
|
||||||
"security_and_backup": "Sigurnost i sigurnosna kopija",
|
"security_and_backup": "Sigurnost i sigurnosna kopija",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "Onemogući exchange",
|
"disable_exchange": "Onemogući exchange",
|
||||||
"advanced_privacy_settings": "Napredne postavke privatnosti",
|
"advanced_privacy_settings": "Napredne postavke privatnosti",
|
||||||
"settings_can_be_changed_later": "Te se postavke mogu promijeniti kasnije u postavkama aplikacije",
|
"settings_can_be_changed_later": "Te se postavke mogu promijeniti kasnije u postavkama aplikacije",
|
||||||
"add_custom_node": "Dodaj novi prilagođeni čvor"
|
"add_custom_node": "Dodaj novi prilagođeni čvor",
|
||||||
|
"disable_fiat": "Isključi, fiat",
|
||||||
|
"fiat_api": "Fiat API",
|
||||||
|
"disabled": "Onemogućeno",
|
||||||
|
"enabled": "Omogućeno",
|
||||||
|
"tor_only": "Samo Tor"
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "Attualmente stai utilizzando una priorità a tariffa di rete bassa. Ciò potrebbe causare lunghe attese, tariffe diverse o operazioni annullate. Ti consigliamo di impostare una tariffa più alta per un'esperienza migliore.",
|
"low_fee_alert": "Attualmente stai utilizzando una priorità a tariffa di rete bassa. Ciò potrebbe causare lunghe attese, tariffe diverse o operazioni annullate. Ti consigliamo di impostare una tariffa più alta per un'esperienza migliore.",
|
||||||
"ignor": "Ignorare",
|
"ignor": "Ignorare",
|
||||||
"use_suggested": "Usa suggerito",
|
"use_suggested": "Usa suggerito",
|
||||||
"do_not_share_warning_text" : "Non condividerli con nessun altro, incluso il supporto.\n\nTi ruberanno i soldi!",
|
"do_not_share_warning_text" : "Non condividerli con nessun altro, incluso il supporto.\n\nI tuoi fondi possono e saranno rubati!",
|
||||||
"help": "aiuto",
|
"help": "aiuto",
|
||||||
"connection_sync": "Connessione e sincronizzazione",
|
"connection_sync": "Connessione e sincronizzazione",
|
||||||
"security_and_backup": "Sicurezza e backup",
|
"security_and_backup": "Sicurezza e backup",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "Disabilita scambio",
|
"disable_exchange": "Disabilita scambio",
|
||||||
"advanced_privacy_settings": "Impostazioni avanzate sulla privacy",
|
"advanced_privacy_settings": "Impostazioni avanzate sulla privacy",
|
||||||
"settings_can_be_changed_later": "Queste impostazioni possono essere modificate in seguito nelle impostazioni dell'app",
|
"settings_can_be_changed_later": "Queste impostazioni possono essere modificate in seguito nelle impostazioni dell'app",
|
||||||
"add_custom_node": "Aggiungi nuovo nodo personalizzato"
|
"add_custom_node": "Aggiungi nuovo nodo personalizzato",
|
||||||
|
"disable_fiat": "Disabilita fiat",
|
||||||
|
"fiat_api": "Fiat API",
|
||||||
|
"disabled": "Disabilitato",
|
||||||
|
"enabled": "Abilitato",
|
||||||
|
"tor_only": "Solo Tor"
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "現在、低ネットワーク料金優先度を使用しています。これにより、長い待ち時間、異なるレート、またはキャンセルされた取引が発生する可能性があります。より良い体験のために、より高い料金を設定することをお勧めします。",
|
"low_fee_alert": "現在、低ネットワーク料金優先度を使用しています。これにより、長い待ち時間、異なるレート、またはキャンセルされた取引が発生する可能性があります。より良い体験のために、より高い料金を設定することをお勧めします。",
|
||||||
"ignor": "無視",
|
"ignor": "無視",
|
||||||
"use_suggested": "推奨を使用",
|
"use_suggested": "推奨を使用",
|
||||||
"do_not_share_warning_text" : "サポートを含め、これらを他の誰とも共有しないでください。\n\n彼らはあなたのお金を盗みます!",
|
"do_not_share_warning_text" : "サポートを含め、これらを他の誰とも共有しないでください。\n\nあなたの資金は盗まれる可能性があります!",
|
||||||
"help": "ヘルプ",
|
"help": "ヘルプ",
|
||||||
"connection_sync": "接続と同期",
|
"connection_sync": "接続と同期",
|
||||||
"security_and_backup": "セキュリティとバックアップ",
|
"security_and_backup": "セキュリティとバックアップ",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "交換を無効にする",
|
"disable_exchange": "交換を無効にする",
|
||||||
"advanced_privacy_settings": "高度なプライバシー設定",
|
"advanced_privacy_settings": "高度なプライバシー設定",
|
||||||
"settings_can_be_changed_later": "これらの設定は、後でアプリの設定で変更できます",
|
"settings_can_be_changed_later": "これらの設定は、後でアプリの設定で変更できます",
|
||||||
"add_custom_node": "新しいカスタム ノードを追加"
|
"add_custom_node": "新しいカスタム ノードを追加",
|
||||||
|
"disable_fiat": "フィアットを無効にする",
|
||||||
|
"fiat_api": "不換紙幣 API",
|
||||||
|
"disabled": "無効",
|
||||||
|
"enabled": "有効",
|
||||||
|
"tor_only": "Torのみ"
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "현재 낮은 네트워크 요금 우선 순위를 사용하고 있습니다. 이로 인해 긴 대기 시간, 다른 요금 또는 취소된 거래가 발생할 수 있습니다. 더 나은 경험을 위해 더 높은 요금을 설정하는 것이 좋습니다.",
|
"low_fee_alert": "현재 낮은 네트워크 요금 우선 순위를 사용하고 있습니다. 이로 인해 긴 대기 시간, 다른 요금 또는 취소된 거래가 발생할 수 있습니다. 더 나은 경험을 위해 더 높은 요금을 설정하는 것이 좋습니다.",
|
||||||
"ignor": "무시하다",
|
"ignor": "무시하다",
|
||||||
"use_suggested": "추천 사용",
|
"use_suggested": "추천 사용",
|
||||||
"do_not_share_warning_text" : "지원을 포함하여 다른 사람과 이러한 정보를 공유하지 마십시오.\n\n그들은 당신의 돈을 훔칠 것입니다!",
|
"do_not_share_warning_text" : "지원을 포함하여 다른 사람과 이러한 정보를 공유하지 마십시오.\n\n귀하의 자금은 도난당할 수 있고 도난당할 수 있습니다!",
|
||||||
"help": "돕다",
|
"help": "돕다",
|
||||||
"connection_sync": "연결 및 동기화",
|
"connection_sync": "연결 및 동기화",
|
||||||
"security_and_backup": "보안 및 백업",
|
"security_and_backup": "보안 및 백업",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "교환 비활성화",
|
"disable_exchange": "교환 비활성화",
|
||||||
"advanced_privacy_settings": "고급 개인 정보 설정",
|
"advanced_privacy_settings": "고급 개인 정보 설정",
|
||||||
"settings_can_be_changed_later": "이 설정은 나중에 앱 설정에서 변경할 수 있습니다.",
|
"settings_can_be_changed_later": "이 설정은 나중에 앱 설정에서 변경할 수 있습니다.",
|
||||||
"add_custom_node": "새 사용자 정의 노드 추가"
|
"add_custom_node": "새 사용자 정의 노드 추가",
|
||||||
|
"disable_fiat": "법정화폐 비활성화",
|
||||||
|
"fiat_api": "명목 화폐 API",
|
||||||
|
"disabled": "장애가 있는",
|
||||||
|
"enabled": "사용",
|
||||||
|
"tor_only": "Tor 뿐"
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "U gebruikt momenteel een lage prioriteit voor netwerkkosten. Dit kan lange wachttijden, andere tarieven of geannuleerde transacties veroorzaken. We raden aan een hogere vergoeding in te stellen voor een betere ervaring.",
|
"low_fee_alert": "U gebruikt momenteel een lage prioriteit voor netwerkkosten. Dit kan lange wachttijden, andere tarieven of geannuleerde transacties veroorzaken. We raden aan een hogere vergoeding in te stellen voor een betere ervaring.",
|
||||||
"ignor": "Negeren",
|
"ignor": "Negeren",
|
||||||
"use_suggested": "Gebruik aanbevolen",
|
"use_suggested": "Gebruik aanbevolen",
|
||||||
"do_not_share_warning_text" : "Deel deze met niemand anders, ook niet met support.\n\nZe zullen je geld stelen!",
|
"do_not_share_warning_text" : "Deel deze met niemand anders, ook niet met support.\n\nUw geld kan en zal worden gestolen!",
|
||||||
"help": "helpen",
|
"help": "helpen",
|
||||||
"connection_sync": "Verbinding en synchronisatie",
|
"connection_sync": "Verbinding en synchronisatie",
|
||||||
"security_and_backup": "Beveiliging en back-up",
|
"security_and_backup": "Beveiliging en back-up",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "Uitwisseling uitschakelen",
|
"disable_exchange": "Uitwisseling uitschakelen",
|
||||||
"advanced_privacy_settings": "Geavanceerde privacy-instellingen",
|
"advanced_privacy_settings": "Geavanceerde privacy-instellingen",
|
||||||
"settings_can_be_changed_later": "Deze instellingen kunnen later worden gewijzigd in de app-instellingen",
|
"settings_can_be_changed_later": "Deze instellingen kunnen later worden gewijzigd in de app-instellingen",
|
||||||
"add_custom_node": "Voeg een nieuw aangepast knooppunt toe"
|
"add_custom_node": "Voeg een nieuw aangepast knooppunt toe",
|
||||||
|
"disable_fiat": "Schakel Fiat uit",
|
||||||
|
"fiat_api": "Fiat API",
|
||||||
|
"disabled": "Gehandicapt",
|
||||||
|
"enabled": "Ingeschakeld",
|
||||||
|
"tor_only": "Alleen Tor"
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "Obecnie korzystasz z niskiego priorytetu opłaty sieciowej. Może to spowodować długie oczekiwanie, różne stawki lub anulowane transakcje. Zalecamy ustawienie wyższej opłaty, aby zapewnić lepsze wrażenia.",
|
"low_fee_alert": "Obecnie korzystasz z niskiego priorytetu opłaty sieciowej. Może to spowodować długie oczekiwanie, różne stawki lub anulowane transakcje. Zalecamy ustawienie wyższej opłaty, aby zapewnić lepsze wrażenia.",
|
||||||
"ignor": "Ignorować",
|
"ignor": "Ignorować",
|
||||||
"use_suggested": "Użyj sugerowane",
|
"use_suggested": "Użyj sugerowane",
|
||||||
"do_not_share_warning_text" : "Nie udostępniaj ich nikomu innemu, w tym wsparcia.\n\nUkradną twoje pieniądze!",
|
"do_not_share_warning_text" : "Nie udostępniaj ich nikomu innemu, w tym pomocy.\n\nTwoje środki mogą i zostaną skradzione!",
|
||||||
"help": "pomoc",
|
"help": "pomoc",
|
||||||
"connection_sync": "Połączenie i synchronizacja",
|
"connection_sync": "Połączenie i synchronizacja",
|
||||||
"security_and_backup": "Bezpieczeństwo i kopia zapasowa",
|
"security_and_backup": "Bezpieczeństwo i kopia zapasowa",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "Wyłącz wymianę",
|
"disable_exchange": "Wyłącz wymianę",
|
||||||
"advanced_privacy_settings": "Zaawansowane ustawienia prywatności",
|
"advanced_privacy_settings": "Zaawansowane ustawienia prywatności",
|
||||||
"settings_can_be_changed_later": "Te ustawienia można później zmienić w ustawieniach aplikacji",
|
"settings_can_be_changed_later": "Te ustawienia można później zmienić w ustawieniach aplikacji",
|
||||||
"add_custom_node": "Dodaj nowy węzeł niestandardowy"
|
"add_custom_node": "Dodaj nowy węzeł niestandardowy",
|
||||||
|
"disable_fiat": "Wyłącz fiat",
|
||||||
|
"fiat_api": "API Fiata",
|
||||||
|
"disabled": "Wyłączone",
|
||||||
|
"enabled": "Włączony",
|
||||||
|
"tor_only": "Tylko Tor"
|
||||||
}
|
}
|
||||||
|
|
|
@ -651,7 +651,7 @@
|
||||||
"low_fee_alert": "No momento, você está usando uma prioridade de taxa de rede baixa. Isso pode causar longas esperas, taxas diferentes ou negociações canceladas. Recomendamos definir uma taxa mais alta para uma melhor experiência.",
|
"low_fee_alert": "No momento, você está usando uma prioridade de taxa de rede baixa. Isso pode causar longas esperas, taxas diferentes ou negociações canceladas. Recomendamos definir uma taxa mais alta para uma melhor experiência.",
|
||||||
"ignor": "Ignorar",
|
"ignor": "Ignorar",
|
||||||
"use_suggested": "Uso sugerido",
|
"use_suggested": "Uso sugerido",
|
||||||
"do_not_share_warning_text" : "Não os compartilhe com mais ninguém, incluindo suporte.\n\nEles vão roubar seu dinheiro!",
|
"do_not_share_warning_text" : "Não os compartilhe com mais ninguém, incluindo suporte.\n\nSeus fundos podem e serão roubados!",
|
||||||
"help": "ajuda",
|
"help": "ajuda",
|
||||||
"connection_sync": "Conexão e sincronização",
|
"connection_sync": "Conexão e sincronização",
|
||||||
"security_and_backup": "Segurança e backup",
|
"security_and_backup": "Segurança e backup",
|
||||||
|
@ -663,5 +663,10 @@
|
||||||
"disable_exchange": "Desativar troca",
|
"disable_exchange": "Desativar troca",
|
||||||
"advanced_privacy_settings": "Configurações de privacidade avançadas",
|
"advanced_privacy_settings": "Configurações de privacidade avançadas",
|
||||||
"settings_can_be_changed_later": "Essas configurações podem ser alteradas posteriormente nas configurações do aplicativo",
|
"settings_can_be_changed_later": "Essas configurações podem ser alteradas posteriormente nas configurações do aplicativo",
|
||||||
"add_custom_node": "Adicionar novo nó personalizado"
|
"add_custom_node": "Adicionar novo nó personalizado",
|
||||||
|
"disable_fiat": "Desativar fiat",
|
||||||
|
"fiat_api": "API da Fiat",
|
||||||
|
"disabled": "Desabilitado",
|
||||||
|
"enabled": "Habilitado",
|
||||||
|
"tor_only": "Tor apenas"
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,7 @@
|
||||||
"low_fee_alert": "В настоящее время вы используете низкий приоритет платы за сеть. Это может привести к длительному ожиданию, изменению ставок или отмене сделок. Мы рекомендуем установить более высокую плату для лучшего опыта.",
|
"low_fee_alert": "В настоящее время вы используете низкий приоритет платы за сеть. Это может привести к длительному ожиданию, изменению ставок или отмене сделок. Мы рекомендуем установить более высокую плату для лучшего опыта.",
|
||||||
"ignor": "Игнорировать",
|
"ignor": "Игнорировать",
|
||||||
"use_suggested": "Использовать предложенный",
|
"use_suggested": "Использовать предложенный",
|
||||||
"do_not_share_warning_text" : "Не делитесь ими с кем-либо еще, в том числе со службой поддержки.\n\nОни украдут ваши деньги!",
|
"do_not_share_warning_text" : "Не сообщайте их никому, включая техподдержку.\n\nВаши средства могут и будут украдены!",
|
||||||
"help": "помощь",
|
"help": "помощь",
|
||||||
"connection_sync": "Подключение и синхронизация",
|
"connection_sync": "Подключение и синхронизация",
|
||||||
"security_and_backup": "Безопасность и резервное копирование",
|
"security_and_backup": "Безопасность и резервное копирование",
|
||||||
|
@ -664,5 +664,10 @@
|
||||||
"disable_exchange": "Отключить обмен",
|
"disable_exchange": "Отключить обмен",
|
||||||
"advanced_privacy_settings": "Расширенные настройки конфиденциальности",
|
"advanced_privacy_settings": "Расширенные настройки конфиденциальности",
|
||||||
"settings_can_be_changed_later": "Эти настройки можно изменить позже в настройках приложения.",
|
"settings_can_be_changed_later": "Эти настройки можно изменить позже в настройках приложения.",
|
||||||
"add_custom_node": "Добавить новый пользовательский узел"
|
"add_custom_node": "Добавить новый пользовательский узел",
|
||||||
|
"disable_fiat": "Отключить фиат",
|
||||||
|
"fiat_api": "Фиат API",
|
||||||
|
"disabled": "Отключено",
|
||||||
|
"enabled": "Включено",
|
||||||
|
"tor_only": "Только Tor"
|
||||||
}
|
}
|
||||||
|
|
|
@ -651,7 +651,7 @@
|
||||||
"low_fee_alert": "Зараз ви використовуєте низький пріоритет плати за мережу. Це може спричинити тривале очікування, інший курс або скасування угод. Ми рекомендуємо встановити вищу плату для кращого досвіду.",
|
"low_fee_alert": "Зараз ви використовуєте низький пріоритет плати за мережу. Це може спричинити тривале очікування, інший курс або скасування угод. Ми рекомендуємо встановити вищу плату для кращого досвіду.",
|
||||||
"ignor": "Ігнорувати",
|
"ignor": "Ігнорувати",
|
||||||
"use_suggested": "Використати запропоноване",
|
"use_suggested": "Використати запропоноване",
|
||||||
"do_not_share_warning_text" : "Не повідомляйте їх нікому, включно зі службою підтримки.\n\nВони вкрадуть ваші гроші!",
|
"do_not_share_warning_text" : "Не діліться цим нікому, включно зі службою підтримки.\n\nВаші кошти можуть і будуть вкрадені!",
|
||||||
"help": "допомога",
|
"help": "допомога",
|
||||||
"connection_sync": "Підключення та синхронізація",
|
"connection_sync": "Підключення та синхронізація",
|
||||||
"security_and_backup": "Безпека та резервне копіювання",
|
"security_and_backup": "Безпека та резервне копіювання",
|
||||||
|
@ -663,5 +663,11 @@
|
||||||
"disable_exchange": "Вимкнути exchange",
|
"disable_exchange": "Вимкнути exchange",
|
||||||
"advanced_privacy_settings": "Розширені налаштування конфіденційності",
|
"advanced_privacy_settings": "Розширені налаштування конфіденційності",
|
||||||
"settings_can_be_changed_later": "Ці параметри можна змінити пізніше в налаштуваннях програми",
|
"settings_can_be_changed_later": "Ці параметри можна змінити пізніше в налаштуваннях програми",
|
||||||
"add_custom_node": "Додати новий спеціальний вузол"
|
"add_custom_node": "Додати новий спеціальний вузол",
|
||||||
|
"disable_fiat": "Вимкнути фиат",
|
||||||
|
"fiat_api": "Фіат API",
|
||||||
|
"disabled": "Вимкнено",
|
||||||
|
"enabled": "Увімкнено",
|
||||||
|
"tor_only": "Тільки Tor"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -650,7 +650,7 @@
|
||||||
"low_fee_alert": "您当前正在使用低网络费用优先级。这可能会导致长时间等待、不同的费率或取消交易。我们建议设置更高的费用以获得更好的体验。",
|
"low_fee_alert": "您当前正在使用低网络费用优先级。这可能会导致长时间等待、不同的费率或取消交易。我们建议设置更高的费用以获得更好的体验。",
|
||||||
"ignor": "忽视",
|
"ignor": "忽视",
|
||||||
"use_suggested": "使用建议",
|
"use_suggested": "使用建议",
|
||||||
"do_not_share_warning_text" : "不要與其他任何人分享這些內容,包括支持。\n\n他們會偷你的錢!",
|
"do_not_share_warning_text" : "请勿与其他任何人分享这些信息,包括支持人员。\n\n您的资金可能而且将会被盗!",
|
||||||
"help": "帮助",
|
"help": "帮助",
|
||||||
"connection_sync": "连接和同步",
|
"connection_sync": "连接和同步",
|
||||||
"security_and_backup": "安全和备份",
|
"security_and_backup": "安全和备份",
|
||||||
|
@ -662,5 +662,10 @@
|
||||||
"disable_exchange": "禁用交换",
|
"disable_exchange": "禁用交换",
|
||||||
"advanced_privacy_settings": "高级隐私设置",
|
"advanced_privacy_settings": "高级隐私设置",
|
||||||
"settings_can_be_changed_later": "稍后可以在应用设置中更改这些设置",
|
"settings_can_be_changed_later": "稍后可以在应用设置中更改这些设置",
|
||||||
"add_custom_node": "添加新的自定义节点"
|
"add_custom_node": "添加新的自定义节点",
|
||||||
|
"disable_fiat": "禁用法令",
|
||||||
|
"fiat_api": "法币API",
|
||||||
|
"disabled": "禁用",
|
||||||
|
"enabled": "启用",
|
||||||
|
"tor_only": "仅限 Tor"
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,7 @@ abstract class Bitcoin {
|
||||||
List<TransactionPriority> getTransactionPriorities();
|
List<TransactionPriority> getTransactionPriorities();
|
||||||
List<TransactionPriority> getLitecoinTransactionPriorities();
|
List<TransactionPriority> getLitecoinTransactionPriorities();
|
||||||
TransactionPriority deserializeBitcoinTransactionPriority(int raw);
|
TransactionPriority deserializeBitcoinTransactionPriority(int raw);
|
||||||
|
TransactionPriority deserializeLitecoinTransactionPriority(int raw);
|
||||||
int getFeeRate(Object wallet, TransactionPriority priority);
|
int getFeeRate(Object wallet, TransactionPriority priority);
|
||||||
Future<void> generateNewAddress(Object wallet);
|
Future<void> generateNewAddress(Object wallet);
|
||||||
Object createBitcoinTransactionCredentials(List<Output> outputs, {required TransactionPriority priority, int? feeRate});
|
Object createBitcoinTransactionCredentials(List<Output> outputs, {required TransactionPriority priority, int? feeRate});
|
||||||
|
|
Loading…
Reference in a new issue