From 5ba44d5b8e56ed6faf99e38c7bec65069fb425c5 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 3 Mar 2023 08:36:56 -0600 Subject: [PATCH] rename eth token wallet class --- lib/pages/token_view/sub_widgets/my_token_select_item.dart | 3 +-- lib/pages/token_view/token_view.dart | 5 ++--- lib/services/ethereum/ethereum_token_service.dart | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/pages/token_view/sub_widgets/my_token_select_item.dart b/lib/pages/token_view/sub_widgets/my_token_select_item.dart index a95f7f71a..d918adb88 100644 --- a/lib/pages/token_view/sub_widgets/my_token_select_item.dart +++ b/lib/pages/token_view/sub_widgets/my_token_select_item.dart @@ -64,8 +64,7 @@ class _MyTokenSelectItemState extends ConsumerState { BorderRadius.circular(Constants.size.circularBorderRadius), ), onPressed: () async { - ref.read(tokenServiceStateProvider.state).state = - EthereumTokenService( + ref.read(tokenServiceStateProvider.state).state = EthTokenWallet( token: widget.token, secureStore: ref.read(secureStoreProvider), ethWallet: ref diff --git a/lib/pages/token_view/token_view.dart b/lib/pages/token_view/token_view.dart index 0126d913c..8552e8ba3 100644 --- a/lib/pages/token_view/token_view.dart +++ b/lib/pages/token_view/token_view.dart @@ -19,9 +19,8 @@ import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart'; import 'package:stackwallet/widgets/rounded_container.dart'; -final tokenServiceStateProvider = - StateProvider((ref) => null); -final tokenServiceProvider = ChangeNotifierProvider( +final tokenServiceStateProvider = StateProvider((ref) => null); +final tokenServiceProvider = ChangeNotifierProvider( (ref) => ref.watch(tokenServiceStateProvider)); /// [eventBus] should only be set during testing diff --git a/lib/services/ethereum/ethereum_token_service.dart b/lib/services/ethereum/ethereum_token_service.dart index fc26a9466..c59ce2657 100644 --- a/lib/services/ethereum/ethereum_token_service.dart +++ b/lib/services/ethereum/ethereum_token_service.dart @@ -28,7 +28,7 @@ import 'package:stackwallet/utilities/logger.dart'; import 'package:tuple/tuple.dart'; import 'package:web3dart/web3dart.dart' as web3dart; -class EthereumTokenService extends ChangeNotifier with EthTokenCache { +class EthTokenWallet extends ChangeNotifier with EthTokenCache { final EthereumWallet ethWallet; final TransactionNotificationTracker tracker; final SecureStorageInterface _secureStore; @@ -42,7 +42,7 @@ class EthereumTokenService extends ChangeNotifier with EthTokenCache { static const _gasLimit = 200000; - EthereumTokenService({ + EthTokenWallet({ required EthContract token, required this.ethWallet, required SecureStorageInterface secureStore,