From 97dfc311dc49c546140c051b4f957c1a7f155709 Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Tue, 25 Jun 2024 08:41:52 -0700 Subject: [PATCH] properly annotate function as an action so it updates the observables [skip ci] --- lib/view_model/lightning_invoice_page_view_model.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/view_model/lightning_invoice_page_view_model.dart b/lib/view_model/lightning_invoice_page_view_model.dart index 65c4fd9b1..6a1bb4a83 100644 --- a/lib/view_model/lightning_invoice_page_view_model.dart +++ b/lib/view_model/lightning_invoice_page_view_model.dart @@ -91,8 +91,10 @@ abstract class LightningInvoicePageViewModelBase with Store { } try { + print("CREATING INVOICE"); String bolt11 = await lightningViewModel.createInvoice(amountSats: amount, description: description); + print("CREATED INVOICE"); state = ExecutedSuccessfullyState(payload: bolt11); } catch (e) { state = FailureState(e.toString()); @@ -108,6 +110,7 @@ abstract class LightningInvoicePageViewModelBase with Store { amount = inputAmount; } + @action Future _fetchLimits() async { final limits = await lightningViewModel.invoiceSoftLimitsSats(); minimum = limits.minFee.toDouble();