diff --git a/snippets/dart_snippets/lib/connecting_lsp.dart b/snippets/dart_snippets/lib/connecting_lsp.dart index 7d8b08a..3443741 100644 --- a/snippets/dart_snippets/lib/connecting_lsp.dart +++ b/snippets/dart_snippets/lib/connecting_lsp.dart @@ -12,6 +12,6 @@ Future getLspInfo() async { Future connectLsp(String lspId) async { // ANCHOR: connect-lsp - return await BreezSDK().connectLSP(lspId); + await BreezSDK().connectLSP(lspId); // ANCHOR_END: connect-lsp } \ No newline at end of file diff --git a/snippets/dart_snippets/lib/getting_started.dart b/snippets/dart_snippets/lib/getting_started.dart index 941cdea..e06f23a 100644 --- a/snippets/dart_snippets/lib/getting_started.dart +++ b/snippets/dart_snippets/lib/getting_started.dart @@ -9,7 +9,7 @@ Future initializeSDK() async { // Initialize SDK logs listener BreezSDK().initialize(); -// Create the default config + // Create the default config Uint8List seed = await BreezSDK().mnemonicToSeed(""); String inviteCode = ""; String apiKey = ""; diff --git a/snippets/go/getting_started.go b/snippets/go/getting_started.go index 062894e..51a4124 100644 --- a/snippets/go/getting_started.go +++ b/snippets/go/getting_started.go @@ -6,7 +6,7 @@ import ( "github.com/breez/breez-sdk-go/breez_sdk" ) -// ANCHOR: init-sdk-requirements +// ANCHOR: init-sdk // SDK events listener type BreezListener struct{} @@ -14,10 +14,7 @@ func (BreezListener) OnEvent(e breez_sdk.BreezEvent) { log.Printf("received event %#v", e) } -// ANCHOR_END: init-sdk-requirements - func GettingStarted() { - // ANCHOR: init-sdk // Create the default config seed, err := breez_sdk.MnemonicToSeed("") if err != nil { @@ -41,7 +38,10 @@ func GettingStarted() { if err != nil { log.Fatalf("Connect failed: %#v", err) } - // ANCHOR_END: init-sdk +} + +// ANCHOR_END: init-sdk +func FetchBalance() { // ANCHOR: fetch-balance if nodeInfo, err := sdk.NodeInfo(); err != nil { lnBalance := nodeInfo.ChannelsBalanceMsat diff --git a/snippets/react-native/receive_payment.ts b/snippets/react-native/receive_payment.ts index 3b2e538..75c1010 100644 --- a/snippets/react-native/receive_payment.ts +++ b/snippets/react-native/receive_payment.ts @@ -6,5 +6,5 @@ const exampleReceiveLightningPayment = async () => { amountMsat: 3000000, description: "Invoice for 3000 sats" }) - // ANCHOR: receive-payment + // ANCHOR_END: receive-payment } diff --git a/src/guide/connecting_lsp.md b/src/guide/connecting_lsp.md index 3ce6517..6ae96b0 100644 --- a/src/guide/connecting_lsp.md +++ b/src/guide/connecting_lsp.md @@ -75,7 +75,7 @@ except Exception as error: ```go {{#include ../../snippets/go/connecting_lsp.go:get-lsp-info}} - ``` +```
C#
@@ -152,7 +152,7 @@ except Exception as error:
Go
- ```go +```go {{#include ../../snippets/go/connecting_lsp.go:connect-lsp}} ```
diff --git a/src/guide/getting_started.md b/src/guide/getting_started.md index aa9c241..b60aac1 100644 --- a/src/guide/getting_started.md +++ b/src/guide/getting_started.md @@ -161,7 +161,6 @@ except Exception as error:
```go -{{#include ../../snippets/go/getting_started.go:init-sdk-requirements}} {{#include ../../snippets/go/getting_started.go:init-sdk}} ```