From 1bfe1d65841f51e29ca992e3770f09d7835e2d18 Mon Sep 17 00:00:00 2001 From: Roei Erez Date: Sun, 26 Nov 2023 09:08:26 +0200 Subject: [PATCH] fix snippets --- snippets/react-native/send_onchain.ts | 3 ++- snippets/rust/src/send_onchain.rs | 2 +- snippets/swift/BreezSDKExamples/Sources/SendOnchain.swift | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/snippets/react-native/send_onchain.ts b/snippets/react-native/send_onchain.ts index 1785f3a..cbdbd5d 100644 --- a/snippets/react-native/send_onchain.ts +++ b/snippets/react-native/send_onchain.ts @@ -2,7 +2,8 @@ import { type ReverseSwapPairInfo, fetchReverseSwapFees, inProgressReverseSwaps, - sendOnchain + sendOnchain, + maxReverseSwapAmount } from '@breeztech/react-native-breez-sdk' const exampleFetchReverseSwapFees = async () => { diff --git a/snippets/rust/src/send_onchain.rs b/snippets/rust/src/send_onchain.rs index c793f99..4b7e1f8 100644 --- a/snippets/rust/src/send_onchain.rs +++ b/snippets/rust/src/send_onchain.rs @@ -38,7 +38,7 @@ async fn max_reverse_swap_amount(sdk: Arc) -> Result<()> { info!( "Max reverse swap amount: {:?}", - max_amount.totalSat + max_amount.total_sat ); // ANCHOR_END: max-reverse-swap-amount diff --git a/snippets/swift/BreezSDKExamples/Sources/SendOnchain.swift b/snippets/swift/BreezSDKExamples/Sources/SendOnchain.swift index 50f3948..87f2776 100644 --- a/snippets/swift/BreezSDKExamples/Sources/SendOnchain.swift +++ b/snippets/swift/BreezSDKExamples/Sources/SendOnchain.swift @@ -24,9 +24,9 @@ func ListCurrentFees(currentFees: ReverseSwapPairInfo) { // ANCHOR_END: get-current-reverse-swap-min-max } -func MaxReverseSwapAmount(sdk: BlockingBreezServices) -> MaxReverseSwapAmountResponse? { +func maxReverseSwapAmount(sdk: BlockingBreezServices) -> MaxReverseSwapAmountResponse? { // ANCHOR: max-reverse-swap-amount - let maxAmount = try? sdk.MaxReverseSwapAmount() + let maxAmount = try? sdk.maxReverseSwapAmount() print("Max reverse swap amount: \(String(describing: maxAmount?.totalSat))") // ANCHOR_END: max-reverse-swap-amount return maxAmount