mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
fix snippets
This commit is contained in:
@@ -13,8 +13,8 @@ func GenerateReceiveOnchainAddress() {
|
|||||||
address := swapInfo.BitcoinAddress
|
address := swapInfo.BitcoinAddress
|
||||||
log.Printf("%v", address)
|
log.Printf("%v", address)
|
||||||
|
|
||||||
log.Printf("Minimum amount allowed to deposit in sats: %v", swapInfo.minAllowedDeposit)
|
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("Maximum amount allowed to deposit in sats: %v", swapInfo.MaxAllowedDeposit)
|
||||||
}
|
}
|
||||||
// ANCHOR_END: generate-receive-onchain-address
|
// ANCHOR_END: generate-receive-onchain-address
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ def generate_receive_onchain_address(sdk_services):
|
|||||||
|
|
||||||
# Send your funds to the below bitcoin address
|
# Send your funds to the below bitcoin address
|
||||||
address = swap_info.bitcoin_address
|
address = swap_info.bitcoin_address
|
||||||
print("Minimum amount allowed to deposit in sats: {}", swap_info.min_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);
|
print("Maximum amount allowed to deposit in sats: {}", swap_info.max_allowed_deposit)
|
||||||
# ANCHOR_END: generate-receive-onchain-address
|
# ANCHOR_END: generate-receive-onchain-address
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
print(error)
|
print(error)
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ const exampleReceiveOnchain = async () => {
|
|||||||
|
|
||||||
// Send your funds to the below bitcoin address
|
// Send your funds to the below bitcoin address
|
||||||
const address = swapInfo.bitcoinAddress
|
const address = swapInfo.bitcoinAddress
|
||||||
console.log("Minimum amount allowed to deposit in sats: {}", swapInfo.minAllowedDeposit);
|
console.log(`Minimum amount allowed to deposit in sats: {}`, swapInfo.minAllowedDeposit)
|
||||||
console.log("Maximum amount allowed to deposit in sats: {}", swapInfo.maxAllowedDeposit);
|
console.log(`Maximum amount allowed to deposit in sats: {}`, swapInfo.maxAllowedDeposit)
|
||||||
// ANCHOR_END: generate-receive-onchain-address
|
// ANCHOR_END: generate-receive-onchain-address
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ use std::sync::Arc;
|
|||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use breez_sdk_core::*;
|
use breez_sdk_core::*;
|
||||||
|
use log::info;
|
||||||
|
|
||||||
async fn generate_receive_onchain_address(sdk: Arc<BreezServices>) -> Result<()> {
|
async fn generate_receive_onchain_address(sdk: Arc<BreezServices>) -> Result<()> {
|
||||||
// ANCHOR: generate-receive-onchain-address
|
// ANCHOR: generate-receive-onchain-address
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ func generateReceiveOnchainAddress(sdk: BlockingBreezServices) -> String? {
|
|||||||
|
|
||||||
// Send your funds to the bellow bitcoin address
|
// Send your funds to the bellow bitcoin address
|
||||||
let address = swapInfo?.bitcoinAddress
|
let address = swapInfo?.bitcoinAddress
|
||||||
print("Minimum amount allowed to deposit in sats: \(swapInfo.minAllowedDeposit)")
|
print("Minimum amount allowed to deposit in sats: \(swapInfo!.minAllowedDeposit)")
|
||||||
print("Maximum amount allowed to deposit in sats: \(swapInfo.maxAllowedDeposit)")
|
print("Maximum amount allowed to deposit in sats: \(swapInfo!.maxAllowedDeposit)")
|
||||||
// ANCHOR_END: generate-receive-onchain-address
|
// ANCHOR_END: generate-receive-onchain-address
|
||||||
|
|
||||||
return address
|
return address
|
||||||
|
|||||||
Reference in New Issue
Block a user