mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-02 03:06:35 +00:00
remove tor icon on electrum based coins
This commit is contained in:
parent
33d6898865
commit
46e89d1d72
3 changed files with 16 additions and 2 deletions
|
@ -191,6 +191,7 @@ Future<void> defaultSettingsMigration(
|
|||
break;
|
||||
case 27:
|
||||
await migrateTorPreferences(sharedPreferences: sharedPreferences);
|
||||
await addOnionNode(nodes);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -287,11 +288,16 @@ Future<void> validateBitcoinSavedTransactionPriority(SharedPreferences sharedPre
|
|||
|
||||
Future<void> addOnionNode(Box<Node> nodes) async {
|
||||
final onionNodeUri = "cakexmrl7bonq7ovjka5kuwuyd3f7qnkz6z6s6dmsy3uckwra7bvggyd.onion:18081";
|
||||
final onionNodeUri2 = "sfprpc5klzs5vyitq2mrooicgk2wcs5ho2nm3niqduvzn5o6ylaslaqd.onion:18089";
|
||||
|
||||
// check if the user has this node before (added it manually)
|
||||
if (nodes.values.firstWhereOrNull((element) => element.uriRaw == onionNodeUri) == null) {
|
||||
await nodes.add(Node(uri: onionNodeUri, type: WalletType.monero));
|
||||
}
|
||||
|
||||
if (nodes.values.firstWhereOrNull((element) => element.uriRaw == onionNodeUri2) == null) {
|
||||
await nodes.add(Node(uri: onionNodeUri2, type: WalletType.monero));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> replaceNodesMigration({required Box<Node> nodes}) async {
|
||||
|
|
|
@ -8,8 +8,7 @@ import 'package:cw_core/sync_status.dart';
|
|||
import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.dart';
|
||||
|
||||
class SyncIndicator extends StatelessWidget {
|
||||
SyncIndicator(
|
||||
{required this.dashboardViewModel, required this.onTap});
|
||||
SyncIndicator({required this.dashboardViewModel, required this.onTap});
|
||||
|
||||
final DashboardViewModel dashboardViewModel;
|
||||
final Function() onTap;
|
||||
|
@ -55,6 +54,11 @@ class SyncIndicator extends StatelessWidget {
|
|||
Row(
|
||||
children: [
|
||||
Observer(builder: (_) {
|
||||
if (dashboardViewModel.isElectrumBased) {
|
||||
return Container(
|
||||
width: 15,
|
||||
);
|
||||
}
|
||||
Widget torImage;
|
||||
switch (dashboardViewModel.torViewModel.torConnectionStatus) {
|
||||
case TorConnectionStatus.connected:
|
||||
|
|
|
@ -279,6 +279,10 @@ abstract class DashboardViewModelBase with Store {
|
|||
|
||||
bool get hasRescan => wallet.type == WalletType.monero || wallet.type == WalletType.haven;
|
||||
|
||||
@computed
|
||||
bool get isElectrumBased =>
|
||||
[WalletType.bitcoin, WalletType.litecoin, WalletType.bitcoinCash].contains(wallet.type);
|
||||
|
||||
final KeyService keyService;
|
||||
|
||||
BalanceViewModel balanceViewModel;
|
||||
|
|
Loading…
Reference in a new issue