mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Nano rep fixes (#1145)
* add preference keys for default nano/banano rep * updates to change rep page, add success message * forgot to save this file * nano_client cleanup * first pass * refactor to use sharedprefs in nano_client * review fixes
This commit is contained in:
parent
8237b89d56
commit
f4e71c72ef
37 changed files with 321 additions and 149 deletions
|
@ -8,18 +8,28 @@ import 'package:cw_nano/nano_util.dart';
|
|||
import 'package:http/http.dart' as http;
|
||||
import 'package:nanodart/nanodart.dart';
|
||||
import 'package:cw_core/node.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
class NanoClient {
|
||||
static const String DEFAULT_REPRESENTATIVE =
|
||||
"nano_38713x95zyjsqzx6nm1dsom1jmm668owkeb9913ax6nfgj15az3nu8xkx579";
|
||||
|
||||
static const Map<String, String> CAKE_HEADERS = {
|
||||
"Content-Type": "application/json",
|
||||
"nano-app": "cake-wallet"
|
||||
};
|
||||
|
||||
NanoClient() {
|
||||
SharedPreferences.getInstance().then((value) => prefs = value);
|
||||
}
|
||||
|
||||
late SharedPreferences prefs;
|
||||
Node? _node;
|
||||
Node? _powNode;
|
||||
static const String _defaultDefaultRepresentative =
|
||||
"nano_38713x95zyjsqzx6nm1dsom1jmm668owkeb9913ax6nfgj15az3nu8xkx579";
|
||||
|
||||
String getRepFromPrefs() {
|
||||
// from preferences_key.dart "defaultNanoRep" key:
|
||||
return prefs.getString("default_nano_representative") ?? _defaultDefaultRepresentative;
|
||||
}
|
||||
|
||||
bool connect(Node node) {
|
||||
try {
|
||||
|
@ -84,11 +94,11 @@ class NanoClient {
|
|||
required String repAddress,
|
||||
required String ourAddress,
|
||||
}) async {
|
||||
try {
|
||||
AccountInfoResponse? accountInfo = await getAccountInfo(ourAddress);
|
||||
|
||||
if (accountInfo == null) {
|
||||
throw Exception("error while getting account info");
|
||||
throw Exception(
|
||||
"error while getting account info, you can't change the rep of an unopened account");
|
||||
}
|
||||
|
||||
// construct the change block:
|
||||
|
@ -119,9 +129,10 @@ class NanoClient {
|
|||
changeBlock["signature"] = signature;
|
||||
changeBlock["work"] = work;
|
||||
|
||||
try {
|
||||
return await processBlock(changeBlock, "change");
|
||||
} catch (e) {
|
||||
throw Exception("error while changing representative");
|
||||
throw Exception("error while changing representative: $e");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,7 +202,6 @@ class NanoClient {
|
|||
BigInt? balanceAfterTx,
|
||||
String? previousHash,
|
||||
}) async {
|
||||
try {
|
||||
// our address:
|
||||
final String publicAddress = NanoUtil.privateKeyToAddress(privateKey);
|
||||
|
||||
|
@ -249,10 +259,6 @@ class NanoClient {
|
|||
|
||||
// ready to post send block:
|
||||
return sendBlock;
|
||||
} catch (e) {
|
||||
print(e);
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> receiveBlock({
|
||||
|
@ -274,7 +280,7 @@ class NanoClient {
|
|||
// account is not open yet, we need to create an open block:
|
||||
openBlock = true;
|
||||
// we don't have a representative set yet:
|
||||
representative = DEFAULT_REPRESENTATIVE;
|
||||
representative = await getRepFromPrefs();
|
||||
// we don't have a frontier yet:
|
||||
frontier = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
} else {
|
||||
|
|
|
@ -382,7 +382,7 @@ abstract class NanoWalletBase
|
|||
_representativeAddress = accountInfo.representative;
|
||||
} catch (e) {
|
||||
// account not found:
|
||||
_representativeAddress = NanoClient.DEFAULT_REPRESENTATIVE;
|
||||
_representativeAddress = await _client.getRepFromPrefs();
|
||||
throw Exception("Failed to get representative address $e");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,6 +290,11 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_web_plugins:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
frontend_server_client:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -594,6 +599,62 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: shared_preferences
|
||||
sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
shared_preferences_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_foundation
|
||||
sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.4"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_linux
|
||||
sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
shared_preferences_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_platform_interface
|
||||
sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
shared_preferences_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_web
|
||||
sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
shared_preferences_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_windows
|
||||
sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
shelf:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -753,4 +814,4 @@ packages:
|
|||
version: "3.1.2"
|
||||
sdks:
|
||||
dart: ">=3.0.0 <4.0.0"
|
||||
flutter: ">=3.3.0"
|
||||
flutter: ">=3.7.0"
|
||||
|
|
|
@ -21,6 +21,7 @@ dependencies:
|
|||
ed25519_hd_key: ^2.2.0
|
||||
hex: ^0.2.0
|
||||
http: ^1.1.0
|
||||
shared_preferences: ^2.0.15
|
||||
cw_core:
|
||||
path: ../cw_core
|
||||
|
||||
|
|
|
@ -247,6 +247,8 @@ class BackupService {
|
|||
final sortBalanceTokensBy = data[PreferencesKey.sortBalanceBy] as int?;
|
||||
final pinNativeTokenAtTop = data[PreferencesKey.pinNativeTokenAtTop] as bool?;
|
||||
final useEtherscan = data[PreferencesKey.useEtherscan] as bool?;
|
||||
final defaultNanoRep = data[PreferencesKey.defaultNanoRep] as String?;
|
||||
final defaultBananoRep = data[PreferencesKey.defaultBananoRep] as String?;
|
||||
final lookupsTwitter = data[PreferencesKey.lookupsTwitter] as bool?;
|
||||
final lookupsMastodon = data[PreferencesKey.lookupsMastodon] as bool?;
|
||||
final lookupsYatService = data[PreferencesKey.lookupsYatService] as bool?;
|
||||
|
@ -327,7 +329,6 @@ class BackupService {
|
|||
await _sharedPreferences.setInt(PreferencesKey.currentTheme, ThemeList.darkTheme.raw);
|
||||
}
|
||||
|
||||
|
||||
if (exchangeStatus != null)
|
||||
await _sharedPreferences.setInt(PreferencesKey.exchangeStatusKey, exchangeStatus);
|
||||
|
||||
|
@ -389,6 +390,13 @@ class BackupService {
|
|||
if (useEtherscan != null)
|
||||
await _sharedPreferences.setBool(PreferencesKey.useEtherscan, useEtherscan);
|
||||
|
||||
if (defaultNanoRep != null)
|
||||
await _sharedPreferences.setString(PreferencesKey.defaultNanoRep, defaultNanoRep);
|
||||
|
||||
if (defaultBananoRep != null)
|
||||
await _sharedPreferences.setString(PreferencesKey.defaultBananoRep, defaultBananoRep);
|
||||
|
||||
if (syncAll != null) await _sharedPreferences.setBool(PreferencesKey.syncAllKey, syncAll);
|
||||
if (lookupsTwitter != null)
|
||||
await _sharedPreferences.setBool(PreferencesKey.lookupsTwitter, lookupsTwitter);
|
||||
|
||||
|
@ -560,6 +568,9 @@ class BackupService {
|
|||
PreferencesKey.pinNativeTokenAtTop:
|
||||
_sharedPreferences.getBool(PreferencesKey.pinNativeTokenAtTop),
|
||||
PreferencesKey.useEtherscan: _sharedPreferences.getBool(PreferencesKey.useEtherscan),
|
||||
PreferencesKey.defaultNanoRep: _sharedPreferences.getString(PreferencesKey.defaultNanoRep),
|
||||
PreferencesKey.defaultBananoRep:
|
||||
_sharedPreferences.getString(PreferencesKey.defaultBananoRep),
|
||||
PreferencesKey.lookupsTwitter: _sharedPreferences.getBool(PreferencesKey.lookupsTwitter),
|
||||
PreferencesKey.lookupsMastodon: _sharedPreferences.getBool(PreferencesKey.lookupsMastodon),
|
||||
PreferencesKey.lookupsYatService:
|
||||
|
|
11
lib/di.dart
11
lib/di.dart
|
@ -522,8 +522,7 @@ Future<void> setup({
|
|||
getIt.registerFactory<Modify2FAPage>(
|
||||
() => Modify2FAPage(setup2FAViewModel: getIt.get<Setup2FAViewModel>()));
|
||||
|
||||
getIt.registerFactory<DesktopSettingsPage>(
|
||||
() => DesktopSettingsPage());
|
||||
getIt.registerFactory<DesktopSettingsPage>(() => DesktopSettingsPage());
|
||||
|
||||
getIt.registerFactoryParam<ReceiveOptionViewModel, ReceivePageOption?, void>(
|
||||
(pageOption, _) => ReceiveOptionViewModel(getIt.get<AppStore>().wallet!, pageOption));
|
||||
|
@ -766,7 +765,10 @@ Future<void> setup({
|
|||
|
||||
getIt.registerFactory(() => OtherSettingsPage(getIt.get<OtherSettingsViewModel>()));
|
||||
|
||||
getIt.registerFactory(() => NanoChangeRepPage(getIt.get<AppStore>().wallet!));
|
||||
getIt.registerFactory(() => NanoChangeRepPage(
|
||||
settingsStore: getIt.get<AppStore>().settingsStore,
|
||||
wallet: getIt.get<AppStore>().wallet!,
|
||||
));
|
||||
|
||||
getIt.registerFactoryParam<NodeCreateOrEditViewModel, WalletType?, bool?>(
|
||||
(WalletType? type, bool? isPow) => NodeCreateOrEditViewModel(
|
||||
|
@ -839,7 +841,8 @@ Future<void> setup({
|
|||
case WalletType.ethereum:
|
||||
return ethereum!.createEthereumWalletService(_walletInfoSource);
|
||||
case WalletType.bitcoinCash:
|
||||
return bitcoinCash!.createBitcoinCashWalletService(_walletInfoSource, _unspentCoinsInfoSource!);
|
||||
return bitcoinCash!
|
||||
.createBitcoinCashWalletService(_walletInfoSource, _unspentCoinsInfoSource!);
|
||||
case WalletType.nano:
|
||||
return nano!.createNanoWalletService(_walletInfoSource);
|
||||
default:
|
||||
|
|
|
@ -50,6 +50,8 @@ class PreferencesKey {
|
|||
static const sortBalanceBy = 'sort_balance_by';
|
||||
static const pinNativeTokenAtTop = 'pin_native_token_at_top';
|
||||
static const useEtherscan = 'use_etherscan';
|
||||
static const defaultNanoRep = 'default_nano_representative';
|
||||
static const defaultBananoRep = 'default_banano_representative';
|
||||
static const lookupsTwitter = 'looks_up_twitter';
|
||||
static const lookupsMastodon = 'looks_up_mastodon';
|
||||
static const lookupsYatService = 'looks_up_mastodon';
|
||||
|
|
|
@ -166,7 +166,10 @@ class CWNano extends Nano {
|
|||
|
||||
@override
|
||||
Future<void> changeRep(Object wallet, String address) async {
|
||||
return (wallet as NanoWallet).changeRep(address);
|
||||
if ((wallet as NanoWallet).transactionHistory.transactions.isEmpty) {
|
||||
throw Exception("Can't change representative without an existing transaction history");
|
||||
}
|
||||
return wallet.changeRep(address);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:cake_wallet/entities/auto_generate_subaddress_status.dart';
|
|||
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||
import 'package:cake_wallet/entities/update_haven_rate.dart';
|
||||
import 'package:cake_wallet/ethereum/ethereum.dart';
|
||||
import 'package:cake_wallet/nano/nano.dart';
|
||||
import 'package:cw_core/transaction_history.dart';
|
||||
import 'package:cw_core/balance.dart';
|
||||
import 'package:cw_core/transaction_info.dart';
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
import 'package:cake_wallet/core/address_validator.dart';
|
||||
import 'package:cake_wallet/nano/nano.dart';
|
||||
import 'package:cake_wallet/src/widgets/address_text_field.dart';
|
||||
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
||||
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
||||
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
|
||||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
import 'package:cake_wallet/themes/extensions/address_theme.dart';
|
||||
import 'package:cake_wallet/utils/payment_request.dart';
|
||||
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:cw_core/wallet_base.dart';
|
||||
|
@ -14,21 +17,28 @@ import 'package:cake_wallet/src/screens/base_page.dart';
|
|||
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
||||
|
||||
class NanoChangeRepPage extends BasePage {
|
||||
NanoChangeRepPage(WalletBase wallet)
|
||||
NanoChangeRepPage({required SettingsStore settingsStore, required WalletBase wallet})
|
||||
: _wallet = wallet,
|
||||
_addressController = TextEditingController() {
|
||||
_settingsStore = settingsStore,
|
||||
_addressController = TextEditingController(),
|
||||
_formKey = GlobalKey<FormState>() {
|
||||
_addressController.text = nano!.getRepresentative(wallet);
|
||||
}
|
||||
|
||||
final TextEditingController _addressController;
|
||||
final WalletBase _wallet;
|
||||
final SettingsStore _settingsStore;
|
||||
|
||||
final GlobalKey<FormState> _formKey;
|
||||
|
||||
@override
|
||||
String get title => S.current.change_rep;
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
return Container(
|
||||
return Form(
|
||||
key: _formKey,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 24, right: 24),
|
||||
child: ScrollableWithBottomSection(
|
||||
contentPadding: EdgeInsets.only(bottom: 24.0),
|
||||
|
@ -38,9 +48,17 @@ class NanoChangeRepPage extends BasePage {
|
|||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: BaseTextFormField(
|
||||
child: AddressTextField(
|
||||
controller: _addressController,
|
||||
hintText: S.of(context).node_address,
|
||||
onURIScanned: (uri) {
|
||||
final paymentRequest = PaymentRequest.fromUri(uri);
|
||||
_addressController.text = paymentRequest.address;
|
||||
},
|
||||
options: [
|
||||
AddressTextFieldOption.paste,
|
||||
AddressTextFieldOption.qrCode,
|
||||
],
|
||||
buttonColor: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
|
||||
validator: AddressValidator(type: CryptoCurrency.nano),
|
||||
),
|
||||
)
|
||||
|
@ -59,6 +77,11 @@ class NanoChangeRepPage extends BasePage {
|
|||
padding: EdgeInsets.only(right: 8.0),
|
||||
child: LoadingPrimaryButton(
|
||||
onPressed: () async {
|
||||
if (_formKey.currentState != null &&
|
||||
!_formKey.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
|
||||
final confirmed = await showPopUp<bool>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
|
@ -74,8 +97,19 @@ class NanoChangeRepPage extends BasePage {
|
|||
|
||||
if (confirmed) {
|
||||
try {
|
||||
_settingsStore.defaultNanoRep = _addressController.text;
|
||||
|
||||
await nano!.changeRep(_wallet, _addressController.text);
|
||||
Navigator.of(context).pop();
|
||||
|
||||
await showPopUp<void>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertWithOneAction(
|
||||
alertTitle: S.of(context).successful,
|
||||
alertContent: S.of(context).change_rep_successful,
|
||||
buttonText: S.of(context).ok,
|
||||
buttonAction: () => Navigator.pop(context));
|
||||
});
|
||||
} catch (e) {
|
||||
await showPopUp<void>(
|
||||
context: context,
|
||||
|
@ -97,6 +131,8 @@ class NanoChangeRepPage extends BasePage {
|
|||
)),
|
||||
],
|
||||
)),
|
||||
));
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,8 @@ abstract class SettingsStoreBase with Store {
|
|||
required this.sortBalanceBy,
|
||||
required this.pinNativeTokenAtTop,
|
||||
required this.useEtherscan,
|
||||
required this.defaultNanoRep,
|
||||
required this.defaultBananoRep,
|
||||
required this.lookupsTwitter,
|
||||
required this.lookupsMastodon,
|
||||
required this.lookupsYatService,
|
||||
|
@ -378,6 +380,13 @@ abstract class SettingsStoreBase with Store {
|
|||
(bool useEtherscan) =>
|
||||
_sharedPreferences.setBool(PreferencesKey.useEtherscan, useEtherscan));
|
||||
|
||||
reaction((_) => defaultNanoRep,
|
||||
(String nanoRep) => _sharedPreferences.setString(PreferencesKey.defaultNanoRep, nanoRep));
|
||||
|
||||
reaction(
|
||||
(_) => defaultBananoRep,
|
||||
(String bananoRep) =>
|
||||
_sharedPreferences.setString(PreferencesKey.defaultBananoRep, bananoRep));
|
||||
reaction(
|
||||
(_) => lookupsTwitter,
|
||||
(bool looksUpTwitter) =>
|
||||
|
@ -541,6 +550,12 @@ abstract class SettingsStoreBase with Store {
|
|||
@observable
|
||||
bool useEtherscan;
|
||||
|
||||
@observable
|
||||
String defaultNanoRep;
|
||||
|
||||
@observable
|
||||
String defaultBananoRep;
|
||||
|
||||
@observable
|
||||
bool lookupsTwitter;
|
||||
|
||||
|
@ -658,8 +673,8 @@ abstract class SettingsStoreBase with Store {
|
|||
final isAppSecure = sharedPreferences.getBool(PreferencesKey.isAppSecureKey) ?? false;
|
||||
final disableBuy = sharedPreferences.getBool(PreferencesKey.disableBuyKey) ?? false;
|
||||
final disableSell = sharedPreferences.getBool(PreferencesKey.disableSellKey) ?? false;
|
||||
final defaultBuyProvider = BuyProviderType.values[sharedPreferences.getInt(
|
||||
PreferencesKey.defaultBuyProvider) ?? 0];
|
||||
final defaultBuyProvider =
|
||||
BuyProviderType.values[sharedPreferences.getInt(PreferencesKey.defaultBuyProvider) ?? 0];
|
||||
final currentFiatApiMode = FiatApiMode.deserialize(
|
||||
raw: sharedPreferences.getInt(PreferencesKey.currentFiatApiModeKey) ??
|
||||
FiatApiMode.enabled.raw);
|
||||
|
@ -722,6 +737,8 @@ abstract class SettingsStoreBase with Store {
|
|||
final pinNativeTokenAtTop =
|
||||
sharedPreferences.getBool(PreferencesKey.pinNativeTokenAtTop) ?? true;
|
||||
final useEtherscan = sharedPreferences.getBool(PreferencesKey.useEtherscan) ?? true;
|
||||
final defaultNanoRep = sharedPreferences.getString(PreferencesKey.defaultNanoRep) ?? "";
|
||||
final defaultBananoRep = sharedPreferences.getString(PreferencesKey.defaultBananoRep) ?? "";
|
||||
final lookupsTwitter = sharedPreferences.getBool(PreferencesKey.lookupsTwitter) ?? true;
|
||||
final lookupsMastodon = sharedPreferences.getBool(PreferencesKey.lookupsMastodon) ?? true;
|
||||
final lookupsYatService = sharedPreferences.getBool(PreferencesKey.lookupsYatService) ?? true;
|
||||
|
@ -836,6 +853,8 @@ abstract class SettingsStoreBase with Store {
|
|||
sortBalanceBy: sortBalanceBy,
|
||||
pinNativeTokenAtTop: pinNativeTokenAtTop,
|
||||
useEtherscan: useEtherscan,
|
||||
defaultNanoRep: defaultNanoRep,
|
||||
defaultBananoRep: defaultBananoRep,
|
||||
lookupsTwitter: lookupsTwitter,
|
||||
lookupsMastodon: lookupsMastodon,
|
||||
lookupsYatService: lookupsYatService,
|
||||
|
@ -982,6 +1001,8 @@ abstract class SettingsStoreBase with Store {
|
|||
.values[sharedPreferences.getInt(PreferencesKey.sortBalanceBy) ?? sortBalanceBy.index];
|
||||
pinNativeTokenAtTop = sharedPreferences.getBool(PreferencesKey.pinNativeTokenAtTop) ?? true;
|
||||
useEtherscan = sharedPreferences.getBool(PreferencesKey.useEtherscan) ?? true;
|
||||
defaultNanoRep = sharedPreferences.getString(PreferencesKey.defaultNanoRep) ?? "";
|
||||
defaultBananoRep = sharedPreferences.getString(PreferencesKey.defaultBananoRep) ?? "";
|
||||
lookupsTwitter = sharedPreferences.getBool(PreferencesKey.lookupsTwitter) ?? true;
|
||||
lookupsMastodon = sharedPreferences.getBool(PreferencesKey.lookupsMastodon) ?? true;
|
||||
lookupsYatService = sharedPreferences.getBool(PreferencesKey.lookupsYatService) ?? true;
|
||||
|
@ -1057,7 +1078,8 @@ abstract class SettingsStoreBase with Store {
|
|||
await _sharedPreferences.setInt(PreferencesKey.currentEthereumNodeIdKey, node.key as int);
|
||||
break;
|
||||
case WalletType.bitcoinCash:
|
||||
await _sharedPreferences.setInt(PreferencesKey.currentBitcoinCashNodeIdKey, node.key as int);
|
||||
await _sharedPreferences.setInt(
|
||||
PreferencesKey.currentBitcoinCashNodeIdKey, node.key as int);
|
||||
break;
|
||||
case WalletType.nano:
|
||||
await _sharedPreferences.setInt(PreferencesKey.currentNanoNodeIdKey, node.key as int);
|
||||
|
|
|
@ -720,6 +720,7 @@
|
|||
"enterWalletConnectURI": "WalletConnect ـﻟ URI ﻞﺧﺩﺃ",
|
||||
"seed_key": "مفتاح البذور",
|
||||
"enter_seed_phrase": "أدخل عبارة البذور الخاصة بك",
|
||||
"change_rep_successful": "تم تغيير ممثل بنجاح",
|
||||
"add_contact": "ﻝﺎﺼﺗﺍ ﺔﻬﺟ ﺔﻓﺎﺿﺇ",
|
||||
"exchange_provider_unsupported": "${providerName} لم يعد مدعومًا!",
|
||||
"domain_looks_up": "ﻝﺎﺠﻤﻟﺍ ﺚﺤﺑ ﺕﺎﻴﻠﻤﻋ",
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"enterWalletConnectURI": "Въведете URI на WalletConnect",
|
||||
"seed_key": "Ключ за семена",
|
||||
"enter_seed_phrase": "Въведете вашата фраза за семена",
|
||||
"change_rep_successful": "Успешно промени представител",
|
||||
"add_contact": "Добави контакт",
|
||||
"exchange_provider_unsupported": "${providerName} вече не се поддържа!",
|
||||
"domain_looks_up": "Търсене на домейни",
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"enterWalletConnectURI": "Zadejte identifikátor URI WalletConnect",
|
||||
"seed_key": "Klíč semen",
|
||||
"enter_seed_phrase": "Zadejte svou frázi semen",
|
||||
"change_rep_successful": "Úspěšně změnil zástupce",
|
||||
"add_contact": "Přidat kontakt",
|
||||
"exchange_provider_unsupported": "${providerName} již není podporováno!",
|
||||
"domain_looks_up": "Vyhledávání domén",
|
||||
|
|
|
@ -722,8 +722,9 @@
|
|||
"awaitDAppProcessing": "Bitte warten Sie, bis die dApp die Verarbeitung abgeschlossen hat.",
|
||||
"copyWalletConnectLink": "Kopieren Sie den WalletConnect-Link von dApp und fügen Sie ihn hier ein",
|
||||
"enterWalletConnectURI": "Geben Sie den WalletConnect-URI ein",
|
||||
"seed_key": "Seed-Schlüssel",
|
||||
"enter_seed_phrase": "Geben Sie Ihre Seed-Phrase ein",
|
||||
"seed_key": "Samenschlüssel",
|
||||
"enter_seed_phrase": "Geben Sie Ihre Samenphrase ein",
|
||||
"change_rep_successful": "Erfolgreich veränderte Vertreter",
|
||||
"add_contact": "Kontakt hinzufügen",
|
||||
"exchange_provider_unsupported": "${providerName} wird nicht mehr unterstützt!",
|
||||
"domain_looks_up": "Domain-Suchen",
|
||||
|
|
|
@ -725,6 +725,7 @@
|
|||
"enterWalletConnectURI": "Enter WalletConnect URI",
|
||||
"seed_key": "Seed key",
|
||||
"enter_seed_phrase": "Enter your seed phrase",
|
||||
"change_rep_successful": "Successfully changed representative",
|
||||
"add_contact": "Add contact",
|
||||
"exchange_provider_unsupported": "${providerName} is no longer supported!",
|
||||
"domain_looks_up": "Domain lookups",
|
||||
|
|
|
@ -724,6 +724,7 @@
|
|||
"enterWalletConnectURI": "Ingrese el URI de WalletConnect",
|
||||
"seed_key": "Llave de semilla",
|
||||
"enter_seed_phrase": "Ingrese su frase de semillas",
|
||||
"change_rep_successful": "Representante cambiado con éxito",
|
||||
"add_contact": "Agregar contacto",
|
||||
"exchange_provider_unsupported": "¡${providerName} ya no es compatible!",
|
||||
"domain_looks_up": "Búsquedas de dominio",
|
||||
|
|
|
@ -722,8 +722,9 @@
|
|||
"awaitDAppProcessing": "Veuillez attendre que l'application décentralisée (dApp) termine le traitement.",
|
||||
"copyWalletConnectLink": "Copiez le lien WalletConnect depuis l'application décentralisée (dApp) et collez-le ici",
|
||||
"enterWalletConnectURI": "Saisissez l'URI de WalletConnect.",
|
||||
"seed_key": "Clé secrète (seed key)",
|
||||
"enter_seed_phrase": "Entrez votre phrase secrète (seed)",
|
||||
"seed_key": "Clé de graines",
|
||||
"enter_seed_phrase": "Entrez votre phrase de semence",
|
||||
"change_rep_successful": "Représentant changé avec succès",
|
||||
"add_contact": "Ajouter le contact",
|
||||
"exchange_provider_unsupported": "${providerName} n'est plus pris en charge !",
|
||||
"domain_looks_up": "Résolution de nom",
|
||||
|
|
|
@ -702,6 +702,7 @@
|
|||
"enterWalletConnectURI": "Shigar da WalletConnect URI",
|
||||
"seed_key": "Maɓallin iri",
|
||||
"enter_seed_phrase": "Shigar da Sert Sentarku",
|
||||
"change_rep_successful": "An samu nasarar canzawa wakilin",
|
||||
"add_contact": "Ƙara lamba",
|
||||
"exchange_provider_unsupported": "${providerName}",
|
||||
"domain_looks_up": "Binciken yanki",
|
||||
|
|
|
@ -724,6 +724,7 @@
|
|||
"enterWalletConnectURI": "वॉलेटकनेक्ट यूआरआई दर्ज करें",
|
||||
"seed_key": "बीज कुंजी",
|
||||
"enter_seed_phrase": "अपना बीज वाक्यांश दर्ज करें",
|
||||
"change_rep_successful": "सफलतापूर्वक बदलकर प्रतिनिधि",
|
||||
"add_contact": "संपर्क जोड़ें",
|
||||
"exchange_provider_unsupported": "${providerName} अब समर्थित नहीं है!",
|
||||
"domain_looks_up": "डोमेन लुकअप",
|
||||
|
|
|
@ -722,6 +722,7 @@
|
|||
"enterWalletConnectURI": "Unesite WalletConnect URI",
|
||||
"seed_key": "Sjemenski ključ",
|
||||
"enter_seed_phrase": "Unesite svoju sjemensku frazu",
|
||||
"change_rep_successful": "Uspješno promijenjena reprezentativna",
|
||||
"add_contact": "Dodaj kontakt",
|
||||
"exchange_provider_unsupported": "${providerName} više nije podržan!",
|
||||
"domain_looks_up": "Pretraga domena",
|
||||
|
|
|
@ -712,6 +712,7 @@
|
|||
"enterWalletConnectURI": "Masukkan URI WalletConnect",
|
||||
"seed_key": "Kunci benih",
|
||||
"enter_seed_phrase": "Masukkan frasa benih Anda",
|
||||
"change_rep_successful": "Berhasil mengubah perwakilan",
|
||||
"add_contact": "Tambah kontak",
|
||||
"exchange_provider_unsupported": "${providerName} tidak lagi didukung!",
|
||||
"domain_looks_up": "Pencarian domain",
|
||||
|
|
|
@ -724,6 +724,7 @@
|
|||
"enterWalletConnectURI": "Inserisci l'URI di WalletConnect",
|
||||
"seed_key": "Chiave di semi",
|
||||
"enter_seed_phrase": "Inserisci la tua frase di semi",
|
||||
"change_rep_successful": "Rappresentante modificato con successo",
|
||||
"add_contact": "Aggiungi contatto",
|
||||
"exchange_provider_unsupported": "${providerName} non è più supportato!",
|
||||
"domain_looks_up": "Ricerche di domini",
|
||||
|
|
|
@ -724,6 +724,7 @@
|
|||
"enterWalletConnectURI": "WalletConnect URI を入力してください",
|
||||
"seed_key": "シードキー",
|
||||
"enter_seed_phrase": "シードフレーズを入力してください",
|
||||
"change_rep_successful": "代表者の変更に成功しました",
|
||||
"add_contact": "連絡先を追加",
|
||||
"exchange_provider_unsupported": "${providerName}はサポートされなくなりました!",
|
||||
"domain_looks_up": "ドメイン検索",
|
||||
|
|
|
@ -722,6 +722,7 @@
|
|||
"enterWalletConnectURI": "WalletConnect URI를 입력하세요.",
|
||||
"seed_key": "시드 키",
|
||||
"enter_seed_phrase": "시드 문구를 입력하십시오",
|
||||
"change_rep_successful": "대리인이 성공적으로 변경되었습니다",
|
||||
"add_contact": "주소록에 추가",
|
||||
"exchange_provider_unsupported": "${providerName}은 더 이상 지원되지 않습니다!",
|
||||
"domain_looks_up": "도메인 조회",
|
||||
|
|
|
@ -722,6 +722,7 @@
|
|||
"enterWalletConnectURI": "WalletConnect URI ကိုရိုက်ထည့်ပါ။",
|
||||
"seed_key": "မျိုးစေ့သော့",
|
||||
"enter_seed_phrase": "သင့်ရဲ့မျိုးစေ့စကားစုကိုရိုက်ထည့်ပါ",
|
||||
"change_rep_successful": "အောင်မြင်စွာကိုယ်စားလှယ်ပြောင်းလဲသွားတယ်",
|
||||
"add_contact": "အဆက်အသွယ်ထည့်ပါ။",
|
||||
"exchange_provider_unsupported": "${providerName} မရှိတော့ပါ!",
|
||||
"domain_looks_up": "ဒိုမိန်းရှာဖွေမှုများ",
|
||||
|
|
|
@ -724,6 +724,7 @@
|
|||
"enterWalletConnectURI": "Voer WalletConnect-URI in",
|
||||
"seed_key": "Zaadsleutel",
|
||||
"enter_seed_phrase": "Voer uw zaadzin in",
|
||||
"change_rep_successful": "Met succes veranderde vertegenwoordiger",
|
||||
"add_contact": "Contactpersoon toevoegen",
|
||||
"exchange_provider_unsupported": "${providerName} wordt niet langer ondersteund!",
|
||||
"domain_looks_up": "Domein opzoeken",
|
||||
|
|
|
@ -724,6 +724,7 @@
|
|||
"enterWalletConnectURI": "Wprowadź identyfikator URI WalletConnect",
|
||||
"seed_key": "Klucz nasion",
|
||||
"enter_seed_phrase": "Wprowadź swoją frazę nasienną",
|
||||
"change_rep_successful": "Pomyślnie zmienił przedstawiciela",
|
||||
"add_contact": "Dodaj kontakt",
|
||||
"exchange_provider_unsupported": "${providerName} nie jest już obsługiwany!",
|
||||
"domain_looks_up": "Wyszukiwanie domen",
|
||||
|
|
|
@ -723,6 +723,7 @@
|
|||
"enterWalletConnectURI": "Insira o URI do WalletConnect",
|
||||
"seed_key": "Chave de semente",
|
||||
"enter_seed_phrase": "Digite sua frase de semente",
|
||||
"change_rep_successful": "Mudou com sucesso o representante",
|
||||
"add_contact": "Adicionar contato",
|
||||
"exchange_provider_unsupported": "${providerName} não é mais suportado!",
|
||||
"domain_looks_up": "Pesquisas de domínio",
|
||||
|
|
|
@ -724,6 +724,7 @@
|
|||
"enterWalletConnectURI": "Введите URI WalletConnect",
|
||||
"seed_key": "Ключ семян",
|
||||
"enter_seed_phrase": "Введите свою семенную фразу",
|
||||
"change_rep_successful": "Успешно изменил представитель",
|
||||
"add_contact": "Добавить контакт",
|
||||
"exchange_provider_unsupported": "${providerName} больше не поддерживается!",
|
||||
"domain_looks_up": "Поиск доменов",
|
||||
|
|
|
@ -722,6 +722,7 @@
|
|||
"enterWalletConnectURI": "เข้าสู่ WalletConnect URI",
|
||||
"seed_key": "คีย์เมล็ดพันธุ์",
|
||||
"enter_seed_phrase": "ป้อนวลีเมล็ดพันธุ์ของคุณ",
|
||||
"change_rep_successful": "เปลี่ยนตัวแทนสำเร็จ",
|
||||
"add_contact": "เพิ่มผู้ติดต่อ",
|
||||
"exchange_provider_unsupported": "${providerName} ไม่ได้รับการสนับสนุนอีกต่อไป!",
|
||||
"domain_looks_up": "การค้นหาโดเมน",
|
||||
|
|
|
@ -719,6 +719,7 @@
|
|||
"enterWalletConnectURI": "Ilagay ang WalletConnect URI",
|
||||
"seed_key": "Seed Key",
|
||||
"enter_seed_phrase": "Ipasok ang iyong pariralang binhi",
|
||||
"change_rep_successful": "Matagumpay na nagbago ng kinatawan",
|
||||
"add_contact": "Magdagdag ng contact",
|
||||
"exchange_provider_unsupported": "Ang ${providerName} ay hindi na suportado!",
|
||||
"domain_looks_up": "Mga paghahanap ng domain",
|
||||
|
|
|
@ -722,6 +722,7 @@
|
|||
"enterWalletConnectURI": "WalletConnect URI'sini girin",
|
||||
"seed_key": "Tohum",
|
||||
"enter_seed_phrase": "Tohum ifadenizi girin",
|
||||
"change_rep_successful": "Temsilciyi başarıyla değiştirdi",
|
||||
"add_contact": "Kişi ekle",
|
||||
"exchange_provider_unsupported": "${providerName} artık desteklenmiyor!",
|
||||
"domain_looks_up": "Etki alanı aramaları",
|
||||
|
|
|
@ -724,6 +724,7 @@
|
|||
"enterWalletConnectURI": "Введіть URI WalletConnect",
|
||||
"seed_key": "Насіннєвий ключ",
|
||||
"enter_seed_phrase": "Введіть свою насіннєву фразу",
|
||||
"change_rep_successful": "Успішно змінив представник",
|
||||
"add_contact": "Додати контакт",
|
||||
"exchange_provider_unsupported": "${providerName} більше не підтримується!",
|
||||
"domain_looks_up": "Пошук доменів",
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"enterWalletConnectURI": "WalletConnect URI ۔ﮟﯾﺮﮐ ﺝﺭﺩ",
|
||||
"seed_key": "بیج کی کلید",
|
||||
"enter_seed_phrase": "اپنے بیج کا جملہ درج کریں",
|
||||
"change_rep_successful": "نمائندہ کو کامیابی کے ساتھ تبدیل کیا",
|
||||
"add_contact": "۔ﮟﯾﺮﮐ ﻞﻣﺎﺷ ﮧﻄﺑﺍﺭ",
|
||||
"exchange_provider_unsupported": "${providerName} اب تعاون نہیں کیا جاتا ہے!",
|
||||
"domain_looks_up": "ڈومین تلاش کرنا",
|
||||
|
|
|
@ -718,6 +718,7 @@
|
|||
"enterWalletConnectURI": "Tẹ WalletConnect URI sii",
|
||||
"seed_key": "Bọtini Ose",
|
||||
"enter_seed_phrase": "Tẹ ọrọ-iru irugbin rẹ",
|
||||
"change_rep_successful": "Ni ifijišẹ yipada aṣoju",
|
||||
"add_contact": "Fi olubasọrọ kun",
|
||||
"exchange_provider_unsupported": "${providerName} ko ni atilẹyin mọ!",
|
||||
"domain_looks_up": "Awọn wiwa agbegbe",
|
||||
|
|
|
@ -723,6 +723,7 @@
|
|||
"enterWalletConnectURI": "输入 WalletConnect URI",
|
||||
"seed_key": "种子钥匙",
|
||||
"enter_seed_phrase": "输入您的种子短语",
|
||||
"change_rep_successful": "成功改变了代表",
|
||||
"add_contact": "增加联系人",
|
||||
"exchange_provider_unsupported": "${providerName}不再支持!",
|
||||
"domain_looks_up": "域名查找",
|
||||
|
|
Loading…
Reference in a new issue