minor fixes

This commit is contained in:
Matthew Fosse 2024-03-01 09:11:43 -08:00
parent b97e2860ff
commit 27add70e61
2 changed files with 9 additions and 8 deletions

View file

@ -208,15 +208,16 @@ class LightningReceiveOnchainPage extends BasePage {
return Expanded(
child: Container(child: Center(child: CircularProgressIndicator())));
}
String min = (snapshot.data as List<String>)[1];
String max = (snapshot.data as List<String>)[2];
String fee = (snapshot.data as List<String>)[3];
min = satsToLightningString(double.parse(min));
max = satsToLightningString(double.parse(max));
fee = satsToLightningString(double.parse(fee));
int min = (snapshot.data as List<int>)[1];
int max = (snapshot.data as List<int>)[2];
int fee = (snapshot.data as List<int>)[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,

View file

@ -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,
);
}),