Compare commits

...
Author SHA1 Message Date
Forte11Cuba 8b0e0dcd15 fix: log error in _loadPendingMintInvoice catch block 2026-02-23 13:18:28 -06:00
Forte11Cuba 0ac2a8b3ad fix: add try/catch to _loadPendingMintInvoice to prevent stuck loading state 2026-02-23 13:12:16 -06:00
Forte11andGitHub a97d7d45bc Merge pull request #55 from Forte11Cuba/fix/invoice-placeholder-flash
ui: suppress invoice placeholder flash while loading pending mint invoice
2026-02-21 01:38:33 -06:00
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
+16 -8
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,20 @@ class _TransactionDetailScreenState extends State<_TransactionDetailScreen> {
/// Busca el invoice en pending mint invoices si no hay metadata.
Future<void> _loadPendingMintInvoice() async {
final invoice = await widget.walletProvider.findPendingMintInvoice(
widget.transaction.mintUrl,
widget.transaction.unit,
);
if (invoice != null && mounted) {
setState(() => _isLoadingPendingInvoice = true);
String? invoice;
try {
invoice = await widget.walletProvider.findPendingMintInvoice(
widget.transaction.mintUrl,
widget.transaction.unit,
);
} catch (e, st) {
debugPrint('findPendingMintInvoice failed: $e\n$st');
}
if (mounted) {
setState(() {
_tokenOrInvoice = invoice;
_isLoadingPendingInvoice = false;
if (invoice != null) _tokenOrInvoice = invoice;
});
}
}
@@ -869,8 +877,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(