refactor manager var out to _manager, comment update

This commit is contained in:
sneurlax 2023-07-20 17:15:25 -05:00
parent b773811eac
commit 20fdcf4817
2 changed files with 6 additions and 5 deletions

View file

@ -46,12 +46,16 @@ class _OrdinalsViewState extends ConsumerState<OrdinalsView> {
late final FocusNode searchFocus;
String _searchTerm = "";
dynamic _manager;
@override
void initState() {
searchController = TextEditingController();
searchFocus = FocusNode();
_manager = ref.watch(walletsChangeNotifierProvider
.select((value) => value.getManager(widget.walletId)));
super.initState();
}
@ -91,10 +95,7 @@ class _OrdinalsViewState extends ConsumerState<OrdinalsView> {
.topNavIconPrimary,
),
onPressed: () async {
final manager = ref.watch(walletsChangeNotifierProvider
.select((value) => value.getManager(widget.walletId)));
(manager.wallet as OrdinalsInterface).refreshInscriptions();
(_manager.wallet as OrdinalsInterface).refreshInscriptions();
},
),
),

View file

@ -52,7 +52,7 @@ mixin OrdinalsInterface {
final utxos = await _db.getUTXOs(_walletId).findAll();
final uniqueAddresses = getUniqueAddressesFromUTXOs(utxos);
_inscriptions = await getInscriptionsFromAddresses(uniqueAddresses);
// TODO save inscriptions to isar which gets watched by a StreamBuilder
// TODO save inscriptions to isar which gets watched by a FutureBuilder/StreamBuilder
}
List<String> getUniqueAddressesFromUTXOs(List<UTXO> utxos) {