From a0e1dd70040f7adc042cb3272b2a421ca8b1ef3c Mon Sep 17 00:00:00 2001 From: Omar Date: Wed, 6 May 2026 23:21:08 +0200 Subject: [PATCH] fix monero.com build --- cw_core/lib/exceptions.dart | 10 ++++++++++ cw_wownero/lib/wownero_wallet_service.dart | 12 +----------- lib/core/wallet_loading_service.dart | 3 +-- .../settings/privacy_settings_view_model.dart | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/cw_core/lib/exceptions.dart b/cw_core/lib/exceptions.dart index 364e332e7..35999b78b 100644 --- a/cw_core/lib/exceptions.dart +++ b/cw_core/lib/exceptions.dart @@ -66,3 +66,13 @@ class RestoreFromSeedException implements Exception { RestoreFromSeedException(this.message); } + +class WalletDeprecationException implements Exception { + final String seed; + final CryptoCurrency curr; + + @override + String toString() => "Wallet type no longer supported"; + + WalletDeprecationException({required this.seed, required this.curr}); +} \ No newline at end of file diff --git a/cw_wownero/lib/wownero_wallet_service.dart b/cw_wownero/lib/wownero_wallet_service.dart index 4933c37dc..c42f7d60c 100644 --- a/cw_wownero/lib/wownero_wallet_service.dart +++ b/cw_wownero/lib/wownero_wallet_service.dart @@ -1,6 +1,6 @@ import 'dart:ffi'; import 'dart:io'; -import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/exceptions.dart' show WalletDeprecationException; import 'package:cw_core/monero_wallet_utils.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cw_core/unspent_coins_info.dart'; @@ -21,16 +21,6 @@ import 'package:hive/hive.dart'; import 'package:polyseed/polyseed.dart'; import 'package:monero/wownero.dart' as wownero; -class WalletDeprecationException implements Exception { - final String seed; - final CryptoCurrency curr; - - @override - String toString() => "Wallet type no longer supported"; - - WalletDeprecationException({required this.seed, required this.curr}); -} - class WowneroNewWalletCredentials extends WalletCredentials { WowneroNewWalletCredentials( {required String name, required this.language, required this.isPolyseed, this.passphrase, String? password}) diff --git a/lib/core/wallet_loading_service.dart b/lib/core/wallet_loading_service.dart index 022f2836f..55c65859f 100644 --- a/lib/core/wallet_loading_service.dart +++ b/lib/core/wallet_loading_service.dart @@ -10,13 +10,12 @@ import 'package:cake_wallet/reactions/on_authentication_state_change.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/utils/exception_handler.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; -import 'package:cw_core/cake_hive.dart'; +import 'package:cw_core/exceptions.dart' show WalletDeprecationException; import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_service.dart'; import 'package:cw_core/wallet_type.dart'; -import 'package:cw_wownero/wownero_wallet_service.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/lib/view_model/settings/privacy_settings_view_model.dart b/lib/view_model/settings/privacy_settings_view_model.dart index eceedf993..c91937da7 100644 --- a/lib/view_model/settings/privacy_settings_view_model.dart +++ b/lib/view_model/settings/privacy_settings_view_model.dart @@ -109,7 +109,7 @@ abstract class PrivacySettingsViewModelBase with Store { bool get canUsePayjoin => _wallet.type == WalletType.bitcoin && DeviceInfo.instance.isMobile; @computed - bool get canUseLightning => _wallet.type == WalletType.bitcoin && !Platform.isWindows; + bool get canUseLightning => _wallet.type == WalletType.bitcoin && !Platform.isWindows && !Platform.isLinux; @computed bool get useLightning => _wallet.type == WalletType.bitcoin && bitcoin!.useLightning(_wallet);