Skip to content

Commit

Permalink
Remove listPaymentsFiltered
Browse files Browse the repository at this point in the history
  • Loading branch information
ok300 committed Jul 3, 2024
1 parent b6a72d9 commit 7f9ebcf
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions snippets/dart_snippets/lib/list_payments.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,3 @@ Future<List<Payment>> listPayments() async {
// ANCHOR_END: list-payments
return paymentsList;
}

Future<List<Payment>> listPaymentsFiltered({
int? fromTimestamp,
int? toTimestamp,
bool? includeFailures,
int? offset,
int? limit,
}) async {
// ANCHOR: list-payments-filtered
/// Get the desired epoch timestamp in seconds
int fromTimestamp = DateTime.now().subtract(const Duration(minutes: 30)).millisecondsSinceEpoch ~/ 1000;

ListPaymentsRequest req = ListPaymentsRequest(
filters: [PaymentTypeFilter.Sent],
fromTimestamp: fromTimestamp,
toTimestamp: toTimestamp,
includeFailures: includeFailures,
offset: offset,
limit: limit,
);
List<Payment> paymentsList = await breezSDK.listPayments(req: req);
print(paymentsList);
// ANCHOR_END: list-payments-filtered
return paymentsList;
}

0 comments on commit 7f9ebcf

Please sign in to comment.