diff --git a/lib/src/screens/receive/lightning_receive_page.dart b/lib/src/screens/receive/lightning_receive_page.dart index da5d62081..5b2e4e5b2 100644 --- a/lib/src/screens/receive/lightning_receive_page.dart +++ b/lib/src/screens/receive/lightning_receive_page.dart @@ -208,15 +208,16 @@ class LightningReceiveOnchainPage extends BasePage { return Expanded( child: Container(child: Center(child: CircularProgressIndicator()))); } - String min = (snapshot.data as List)[1]; - String max = (snapshot.data as List)[2]; - String fee = (snapshot.data as List)[3]; - min = satsToLightningString(double.parse(min)); - max = satsToLightningString(double.parse(max)); - fee = satsToLightningString(double.parse(fee)); + int min = (snapshot.data as List)[1]; + int max = (snapshot.data as List)[2]; + int fee = (snapshot.data as List)[3]; return Expanded( child: Text( - S.of(context).lightning_receive_limits(min, max, fee), + S.of(context).lightning_receive_limits( + satsToLightningString(min), + satsToLightningString(max), + satsToLightningString(fee), + ), maxLines: 10, style: TextStyle( fontSize: 14, diff --git a/lib/src/screens/receive/widgets/lightning_input_form.dart b/lib/src/screens/receive/widgets/lightning_input_form.dart index dc176a6f8..124053558 100644 --- a/lib/src/screens/receive/widgets/lightning_input_form.dart +++ b/lib/src/screens/receive/widgets/lightning_input_form.dart @@ -45,7 +45,7 @@ class LightningInvoiceForm extends StatelessWidget { controller: amountController, focusNode: depositAmountFocus, maxAmount: '', - minAmount: (lightningInvoicePageViewModel.minimum != null) ? satsToLightningString(lightningInvoicePageViewModel.minimum!) : '...', + minAmount: (lightningInvoicePageViewModel.minimum != null) ? satsToLightningString(lightningInvoicePageViewModel.minimum!.round()) : '...', selectedCurrency: CryptoCurrency.satoshis, ); }),