Update Go and RN snippets to 0.2.9

This commit is contained in:
Ross Savage
2023-11-13 12:16:00 +01:00
committed by ok300
parent 01ef82a696
commit 751468285c
6 changed files with 14 additions and 12 deletions

View File

@@ -8,7 +8,7 @@ import (
func ListPayments() {
// ANCHOR: list-payments
if payments, err := sdk.ListPayments(breez_sdk.ListPaymentsRequest{Filter: breez_sdk.PaymentTypeFilterAll}); err == nil {
if payments, err := sdk.ListPayments(breez_sdk.ListPaymentsRequest{}); err == nil {
log.Printf("%#v", payments)
}
// ANCHOR_END: list-payments
@@ -16,10 +16,11 @@ func ListPayments() {
func ListPaymentsFiltered() {
// ANCHOR: list-payments-filtered
filters := []breez_sdk.PaymentTypeFilter{breez_sdk.PaymentTypeFilterSent}
fromTimestamp := int64(1696880000)
includeFailures := true
listPaymentsRequest := breez_sdk.ListPaymentsRequest{
Filter: breez_sdk.PaymentTypeFilterSent,
Filters: &filters,
FromTimestamp: &fromTimestamp,
IncludeFailures: &includeFailures,
}