stack_wallet/lib/providers/churning/churning_service_provider.dart
2024-11-12 18:13:37 -06:00

12 lines
464 B
Dart

import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../services/churning_service.dart';
import '../../wallets/wallet/intermediate/lib_monero_wallet.dart';
import '../global/wallets_provider.dart';
final pChurningService = ChangeNotifierProvider.family<ChurningService, String>(
(ref, walletId) {
final wallet = ref.watch(pWallets.select((s) => s.getWallet(walletId)));
return ChurningService(wallet: wallet as LibMoneroWallet);
},
);