diff --git a/snippets/go/go.mod b/snippets/go/go.mod index e49a183..ebdc98e 100644 --- a/snippets/go/go.mod +++ b/snippets/go/go.mod @@ -2,5 +2,6 @@ module main go 1.19 -require github.com/breez/breez-sdk-go v0.2.7 +require github.com/breez/breez-sdk-go v0.2.9 + replace github.com/breez/breez-sdk-go => ./packages/breez-sdk-go diff --git a/snippets/go/list_payments.go b/snippets/go/list_payments.go index e55c4e1..858a561 100644 --- a/snippets/go/list_payments.go +++ b/snippets/go/list_payments.go @@ -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, } diff --git a/snippets/react-native/list_payments.ts b/snippets/react-native/list_payments.ts index 9f36687..30aadb6 100644 --- a/snippets/react-native/list_payments.ts +++ b/snippets/react-native/list_payments.ts @@ -5,14 +5,14 @@ import { const exampleListPayments = async () => { // ANCHOR: list-payments - const payments = listPayments({ filter: PaymentTypeFilter.ALL }) + const payments = listPayments({}) // ANCHOR_END: list-payments } const exampleListPaymentsFiltered = async () => { // ANCHOR: list-payments-filtered const payments = listPayments({ - filter: PaymentTypeFilter.SENT, + filters: [PaymentTypeFilter.SENT], fromTimestamp: 1696880000, includeFailures: true }) diff --git a/snippets/react-native/package.json b/snippets/react-native/package.json index 2599f99..9645661 100644 --- a/snippets/react-native/package.json +++ b/snippets/react-native/package.json @@ -8,12 +8,11 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { - "@breeztech/react-native-breez-sdk": "0.2.7", + "@breeztech/react-native-breez-sdk": "0.2.9", "react": "18.1.0", "react-native": "0.70.6" }, "devDependencies": { "tsx": "^3.12.7" } - } - \ No newline at end of file +} diff --git a/snippets/react-native/send_payment.ts b/snippets/react-native/send_payment.ts index 2a86cbe..7d29ba0 100644 --- a/snippets/react-native/send_payment.ts +++ b/snippets/react-native/send_payment.ts @@ -2,6 +2,7 @@ import { sendPayment } from "@breeztech/react-native-breez-sdk" const exampleSendLightningPayment = async () => { // ANCHOR: send-payment + const bolt11 = "bolt11 invoice" // The `amountMsat` param is optional and should only passed if the bolt11 doesn't specify an amount. // The amountMsat is required in case an amount is not specified in the bolt11 invoice'. const amountMsat = 3000000 diff --git a/snippets/react-native/yarn.lock b/snippets/react-native/yarn.lock index 2097498..49a73a4 100644 --- a/snippets/react-native/yarn.lock +++ b/snippets/react-native/yarn.lock @@ -709,10 +709,10 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@breeztech/react-native-breez-sdk@0.2.7": - version "0.2.7" - resolved "https://registry.yarnpkg.com/@breeztech/react-native-breez-sdk/-/react-native-breez-sdk-0.2.7.tgz#8c2fae69df11e43852f0744b1f39f45057a7cabd" - integrity sha512-/d0O54YNzd6dIjPVu6uX3iBFXu54EjunUvdT0cWsaIXUXfAlVyr3DLio4dQ+PDSMQXM3vtaggC3MBFGeGfq9OA== +"@breeztech/react-native-breez-sdk@0.2.9": + version "0.2.9" + resolved "https://registry.yarnpkg.com/@breeztech/react-native-breez-sdk/-/react-native-breez-sdk-0.2.9.tgz#e1bcd37f16b92ac5792fedf7c4afa481322dac80" + integrity sha512-4mziuxCa8hpDGtMFD4VWK7tj+z3F/48x5NsKwxIYMkfLxxYP+6ZvD0ucEbyqr3P0Lwn0Cj4/iCnwM2gIL8UFcw== "@esbuild/android-arm64@0.18.20": version "0.18.20"