mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
Add React Native snippets
This commit is contained in:
20
snippets/react-native/list_payments.ts
Normal file
20
snippets/react-native/list_payments.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import {
|
||||
listPayments,
|
||||
PaymentTypeFilter
|
||||
} from "@breeztech/react-native-breez-sdk"
|
||||
|
||||
const exampleListPayments = async () => {
|
||||
// ANCHOR: list-payments
|
||||
const payments = listPayments({ filter: PaymentTypeFilter.ALL })
|
||||
// ANCHOR_END: list-payments
|
||||
}
|
||||
|
||||
const exampleListPaymentsFiltered = async () => {
|
||||
// ANCHOR: list-payments-filtered
|
||||
const payments = listPayments({
|
||||
filter: PaymentTypeFilter.SENT,
|
||||
fromTimestamp: 1696880000,
|
||||
includeFailures: true
|
||||
})
|
||||
// ANCHOR_END: list-payments-filtered
|
||||
}
|
||||
Reference in New Issue
Block a user