reclaimablePending function
Funding transactions reclaimable via Cashu.retrieveFunds: they carry a
mint quote, method and used keysets. Pending sends/redeems have none and are
skipped. Optionally filtered to a single mintUrl.
Implementation
List<CashuWalletTransaction> reclaimablePending(
Iterable<WalletTransaction> transactions, {
String? mintUrl,
}) {
return transactions
.whereType<CashuWalletTransaction>()
.where(
(tx) =>
(mintUrl == null || tx.mintUrl == mintUrl) &&
tx.qoute != null &&
tx.method != null &&
tx.usedKeysets != null,
)
.toList();
}