mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-05 07:14:20 +01:00
Add FiatAPI methods to Liquid SDK (#331)
* Add FiatAPI methods to Liquid SDK * Add mirrored structs of fiat crate on Dart bindings * Re-generate bindings * Fix sdk-common imports * Avoid using hardcoded Breez Server URL, re-use sdk-common constant * Update Cargo.lock --------- Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>
This commit is contained in:
@@ -106,6 +106,10 @@ pub(crate) enum Command {
|
||||
/// LNURL-auth endpoint
|
||||
lnurl: String,
|
||||
},
|
||||
/// List fiat currencies
|
||||
ListFiat {},
|
||||
/// Fetch available fiat rates
|
||||
FetchFiatRates {},
|
||||
}
|
||||
|
||||
#[derive(Helper, Completer, Hinter, Validator)]
|
||||
@@ -376,6 +380,14 @@ pub(crate) async fn handle_command(
|
||||
|
||||
command_result!(res)
|
||||
}
|
||||
Command::FetchFiatRates {} => {
|
||||
let res = sdk.fetch_fiat_rates().await?;
|
||||
command_result!(res)
|
||||
}
|
||||
Command::ListFiat {} => {
|
||||
let res = sdk.list_fiat_currencies().await?;
|
||||
command_result!(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user