mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
Use snippet anchor instead of line range
This commit is contained in:
@@ -5,18 +5,23 @@ use anyhow::Result;
|
||||
use breez_sdk_core::*;
|
||||
|
||||
async fn list_supported_fiat_currencies(sdk: Arc<BreezServices>) -> Result<()> {
|
||||
// ANCHOR: list-fiat-currencies
|
||||
let supported_fiat_currencies = sdk.list_fiat_currencies().await?;
|
||||
// ANCHOR_END: list-fiat-currencies
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn get_current_rates(sdk: Arc<BreezServices>) -> Result<()> {
|
||||
// ANCHOR: fetch-fiat-rates
|
||||
let fiat_rates = sdk.fetch_fiat_rates().await?;
|
||||
// ANCHOR_END: fetch-fiat-rates
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn get_fiat_currencies_and_rates(sdk: Arc<BreezServices>) -> Result<Vec<(FiatCurrency, Rate)>> {
|
||||
// ANCHOR: get-fiat-currencies-and-rates
|
||||
let supported_fiat_currencies = sdk.list_fiat_currencies().await?;
|
||||
let fiat_rates = sdk.fetch_fiat_rates().await?;
|
||||
|
||||
@@ -37,4 +42,5 @@ async fn get_fiat_currencies_and_rates(sdk: Arc<BreezServices>) -> Result<Vec<(F
|
||||
}
|
||||
|
||||
Ok(result)
|
||||
// ANCHOR_END: get-fiat-currencies-and-rates
|
||||
}
|
||||
Reference in New Issue
Block a user