From a381cd0a47739bcd9570e1cf7781ebdbdf88a4d4 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 24 Aug 2023 11:22:13 -0500 Subject: [PATCH] FusionInterface->FusionWalletInterface a la PayNymWalletInterface (big ups, mad respec) --- lib/pages/cashfusion/cashfusion_view.dart | 6 +++--- .../cashfusion/desktop_cashfusion_view.dart | 4 ++-- lib/services/coins/bitcoincash/bitcoincash_wallet.dart | 4 ++-- lib/services/coins/manager.dart | 4 ++-- .../{fusion_interface.dart => fusion_wallet_interface.dart} | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) rename lib/services/mixins/{fusion_interface.dart => fusion_wallet_interface.dart} (99%) diff --git a/lib/pages/cashfusion/cashfusion_view.dart b/lib/pages/cashfusion/cashfusion_view.dart index d7ef249a2..2d61828d4 100644 --- a/lib/pages/cashfusion/cashfusion_view.dart +++ b/lib/pages/cashfusion/cashfusion_view.dart @@ -12,7 +12,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:stackwallet/providers/global/wallets_provider.dart'; -import 'package:stackwallet/services/mixins/fusion_interface.dart'; +import 'package:stackwallet/services/mixins/fusion_wallet_interface.dart'; import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/show_loading.dart'; @@ -81,7 +81,7 @@ class _CashFusionViewState extends ConsumerState { (ref .read(walletsChangeNotifierProvider) .getManager(widget.walletId) - .wallet as FusionInterface) + .wallet as FusionWalletInterface) .refreshFusion() ]), context: context, @@ -113,7 +113,7 @@ class _CashFusionViewState extends ConsumerState { (ref .read(walletsChangeNotifierProvider) .getManager(widget.walletId) - .wallet as FusionInterface) + .wallet as FusionWalletInterface) .fuse() }, child: Text( diff --git a/lib/pages_desktop_specific/cashfusion/desktop_cashfusion_view.dart b/lib/pages_desktop_specific/cashfusion/desktop_cashfusion_view.dart index 88da3b5f5..8e0d93ea9 100644 --- a/lib/pages_desktop_specific/cashfusion/desktop_cashfusion_view.dart +++ b/lib/pages_desktop_specific/cashfusion/desktop_cashfusion_view.dart @@ -12,7 +12,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:stackwallet/providers/global/wallets_provider.dart'; -import 'package:stackwallet/services/mixins/fusion_interface.dart'; +import 'package:stackwallet/services/mixins/fusion_wallet_interface.dart'; import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/text_styles.dart'; @@ -107,7 +107,7 @@ class _DesktopCashFusion extends ConsumerState { (ref .read(walletsChangeNotifierProvider) .getManager(widget.walletId) - .wallet as FusionInterface) + .wallet as FusionWalletInterface) .fuse() }, child: Text( diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index 3a6afbeed..9ac2164a6 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -38,7 +38,7 @@ import 'package:stackwallet/services/event_bus/events/global/updated_in_backgrou import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart'; import 'package:stackwallet/services/event_bus/global_event_bus.dart'; import 'package:stackwallet/services/mixins/coin_control_interface.dart'; -import 'package:stackwallet/services/mixins/fusion_interface.dart'; +import 'package:stackwallet/services/mixins/fusion_wallet_interface.dart'; import 'package:stackwallet/services/mixins/wallet_cache.dart'; import 'package:stackwallet/services/mixins/wallet_db.dart'; import 'package:stackwallet/services/mixins/xpubable.dart'; @@ -114,7 +114,7 @@ String constructDerivePath({ } class BitcoinCashWallet extends CoinServiceAPI - with WalletCache, WalletDB, CoinControlInterface, FusionInterface + with WalletCache, WalletDB, CoinControlInterface, FusionWalletInterface implements XPubAble { BitcoinCashWallet({ required String walletId, diff --git a/lib/services/coins/manager.dart b/lib/services/coins/manager.dart index f40b23cc6..d94f7a99e 100644 --- a/lib/services/coins/manager.dart +++ b/lib/services/coins/manager.dart @@ -21,8 +21,8 @@ import 'package:stackwallet/services/event_bus/events/global/node_connection_sta import 'package:stackwallet/services/event_bus/events/global/updated_in_background_event.dart'; import 'package:stackwallet/services/event_bus/global_event_bus.dart'; import 'package:stackwallet/services/mixins/coin_control_interface.dart'; +import 'package:stackwallet/services/mixins/fusion_wallet_interface.dart'; import 'package:stackwallet/services/mixins/ordinals_interface.dart'; -import 'package:stackwallet/services/mixins/fusion_interface.dart'; import 'package:stackwallet/services/mixins/paynym_wallet_interface.dart'; import 'package:stackwallet/services/mixins/xpubable.dart'; import 'package:stackwallet/utilities/amount/amount.dart'; @@ -252,7 +252,7 @@ class Manager with ChangeNotifier { bool get hasWhirlpoolSupport => false; - bool get hasFusionSupport => _currentWallet is FusionInterface; + bool get hasFusionSupport => _currentWallet is FusionWalletInterface; int get rescanOnOpenVersion => DB.instance.get( diff --git a/lib/services/mixins/fusion_interface.dart b/lib/services/mixins/fusion_wallet_interface.dart similarity index 99% rename from lib/services/mixins/fusion_interface.dart rename to lib/services/mixins/fusion_wallet_interface.dart index e61a45665..519a72a2d 100644 --- a/lib/services/mixins/fusion_interface.dart +++ b/lib/services/mixins/fusion_wallet_interface.dart @@ -10,7 +10,7 @@ import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart'; const String kReservedFusionAddress = "reserved_fusion_address"; -mixin FusionInterface { +mixin FusionWalletInterface { // passed in wallet data late final String _walletId; late final Coin _coin;