properly annotate function as an action so it updates the observables [skip ci]

This commit is contained in:
Matthew Fosse 2024-06-25 08:41:52 -07:00
parent 0293330035
commit 97dfc311dc

View file

@ -91,8 +91,10 @@ abstract class LightningInvoicePageViewModelBase with Store {
} }
try { try {
print("CREATING INVOICE");
String bolt11 = String bolt11 =
await lightningViewModel.createInvoice(amountSats: amount, description: description); await lightningViewModel.createInvoice(amountSats: amount, description: description);
print("CREATED INVOICE");
state = ExecutedSuccessfullyState(payload: bolt11); state = ExecutedSuccessfullyState(payload: bolt11);
} catch (e) { } catch (e) {
state = FailureState(e.toString()); state = FailureState(e.toString());
@ -108,6 +110,7 @@ abstract class LightningInvoicePageViewModelBase with Store {
amount = inputAmount; amount = inputAmount;
} }
@action
Future<void> _fetchLimits() async { Future<void> _fetchLimits() async {
final limits = await lightningViewModel.invoiceSoftLimitsSats(); final limits = await lightningViewModel.invoiceSoftLimitsSats();
minimum = limits.minFee.toDouble(); minimum = limits.minFee.toDouble();