rename eth token wallet class

This commit is contained in:
julian 2023-03-03 08:36:56 -06:00
parent f26fb19453
commit 5ba44d5b8e
3 changed files with 5 additions and 7 deletions

View file

@ -64,8 +64,7 @@ class _MyTokenSelectItemState extends ConsumerState<MyTokenSelectItem> {
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

View file

@ -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<EthereumTokenService?>((ref) => null);
final tokenServiceProvider = ChangeNotifierProvider<EthereumTokenService?>(
final tokenServiceStateProvider = StateProvider<EthTokenWallet?>((ref) => null);
final tokenServiceProvider = ChangeNotifierProvider<EthTokenWallet?>(
(ref) => ref.watch(tokenServiceStateProvider));
/// [eventBus] should only be set during testing

View file

@ -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,