From c1a70165a75afd147fe21271b5777eb330862272 Mon Sep 17 00:00:00 2001 From: Roei Erez Date: Tue, 12 Dec 2023 18:11:22 +0200 Subject: [PATCH] fix snippets --- snippets/go/receive_onchain.go | 4 ++-- snippets/python/src/receive_onchain.py | 4 ++-- snippets/react-native/receive_onchain.ts | 4 ++-- snippets/rust/src/receive_onchain.rs | 1 + snippets/swift/BreezSDKExamples/Sources/ReceiveOnchain.swift | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/snippets/go/receive_onchain.go b/snippets/go/receive_onchain.go index 9e0f229..a8941a4 100644 --- a/snippets/go/receive_onchain.go +++ b/snippets/go/receive_onchain.go @@ -13,8 +13,8 @@ func GenerateReceiveOnchainAddress() { address := swapInfo.BitcoinAddress log.Printf("%v", address) - log.Printf("Minimum amount allowed to deposit in sats: %v", swapInfo.minAllowedDeposit) - log.Printf("Maximum amount allowed to deposit in sats: %v", swapInfo.maxAllowedDeposit) + log.Printf("Minimum amount allowed to deposit in sats: %v", swapInfo.MinAllowedDeposit) + log.Printf("Maximum amount allowed to deposit in sats: %v", swapInfo.MaxAllowedDeposit) } // ANCHOR_END: generate-receive-onchain-address } diff --git a/snippets/python/src/receive_onchain.py b/snippets/python/src/receive_onchain.py index fd4042a..34ba3b2 100644 --- a/snippets/python/src/receive_onchain.py +++ b/snippets/python/src/receive_onchain.py @@ -7,8 +7,8 @@ def generate_receive_onchain_address(sdk_services): # Send your funds to the below bitcoin address address = swap_info.bitcoin_address - print("Minimum amount allowed to deposit in sats: {}", swap_info.min_allowed_deposit); - print("Maximum amount allowed to deposit in sats: {}", swap_info.max_allowed_deposit); + print("Minimum amount allowed to deposit in sats: {}", swap_info.min_allowed_deposit) + print("Maximum amount allowed to deposit in sats: {}", swap_info.max_allowed_deposit) # ANCHOR_END: generate-receive-onchain-address except Exception as error: print(error) diff --git a/snippets/react-native/receive_onchain.ts b/snippets/react-native/receive_onchain.ts index 03e8e9d..6272bff 100644 --- a/snippets/react-native/receive_onchain.ts +++ b/snippets/react-native/receive_onchain.ts @@ -12,8 +12,8 @@ const exampleReceiveOnchain = async () => { // Send your funds to the below bitcoin address const address = swapInfo.bitcoinAddress - console.log("Minimum amount allowed to deposit in sats: {}", swapInfo.minAllowedDeposit); - console.log("Maximum amount allowed to deposit in sats: {}", swapInfo.maxAllowedDeposit); + console.log(`Minimum amount allowed to deposit in sats: {}`, swapInfo.minAllowedDeposit) + console.log(`Maximum amount allowed to deposit in sats: {}`, swapInfo.maxAllowedDeposit) // ANCHOR_END: generate-receive-onchain-address } diff --git a/snippets/rust/src/receive_onchain.rs b/snippets/rust/src/receive_onchain.rs index 7ce00e3..452c321 100644 --- a/snippets/rust/src/receive_onchain.rs +++ b/snippets/rust/src/receive_onchain.rs @@ -2,6 +2,7 @@ use std::sync::Arc; use anyhow::Result; use breez_sdk_core::*; +use log::info; async fn generate_receive_onchain_address(sdk: Arc) -> Result<()> { // ANCHOR: generate-receive-onchain-address diff --git a/snippets/swift/BreezSDKExamples/Sources/ReceiveOnchain.swift b/snippets/swift/BreezSDKExamples/Sources/ReceiveOnchain.swift index 9c9d1f9..1e553ae 100644 --- a/snippets/swift/BreezSDKExamples/Sources/ReceiveOnchain.swift +++ b/snippets/swift/BreezSDKExamples/Sources/ReceiveOnchain.swift @@ -14,8 +14,8 @@ func generateReceiveOnchainAddress(sdk: BlockingBreezServices) -> String? { // Send your funds to the bellow bitcoin address let address = swapInfo?.bitcoinAddress - print("Minimum amount allowed to deposit in sats: \(swapInfo.minAllowedDeposit)") - print("Maximum amount allowed to deposit in sats: \(swapInfo.maxAllowedDeposit)") + print("Minimum amount allowed to deposit in sats: \(swapInfo!.minAllowedDeposit)") + print("Maximum amount allowed to deposit in sats: \(swapInfo!.maxAllowedDeposit)") // ANCHOR_END: generate-receive-onchain-address return address