Compare commits

...
Author SHA1 Message Date
Forte11Cuba bf2c4771dd ui: suppress invoice placeholder flash while loading pending mint invoice 2026-02-21 01:30:53 -06:00
Forte11andGitHub 5821ea2be5 Merge pull request #54 from Forte11Cuba/ui/offline-send-select-all-label
ui: add label to select all checkbox in offline send screen
2026-02-21 01:25:01 -06:00
+7 -4
View File
@@ -693,6 +693,7 @@ class _TransactionDetailScreenState extends State<_TransactionDetailScreen> {
late final bool _isLightning;
String? _tokenOrInvoice;
late final bool _shouldShowQR;
bool _isLoadingPendingInvoice = false;
@override
void initState() {
@@ -720,13 +721,15 @@ class _TransactionDetailScreenState extends State<_TransactionDetailScreen> {
/// Busca el invoice en pending mint invoices si no hay metadata.
Future<void> _loadPendingMintInvoice() async {
setState(() => _isLoadingPendingInvoice = true);
final invoice = await widget.walletProvider.findPendingMintInvoice(
widget.transaction.mintUrl,
widget.transaction.unit,
);
if (invoice != null && mounted) {
if (mounted) {
setState(() {
_tokenOrInvoice = invoice;
_isLoadingPendingInvoice = false;
if (invoice != null) _tokenOrInvoice = invoice;
});
}
}
@@ -869,8 +872,8 @@ class _TransactionDetailScreenState extends State<_TransactionDetailScreen> {
const SizedBox(height: 32),
],
// Mensaje si no hay token/invoice
if (_tokenOrInvoice == null) ...[
// Mensaje si no hay token/invoice (ocultar mientras carga)
if (_tokenOrInvoice == null && !_isLoadingPendingInvoice) ...[
Container(
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(