mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 22:04:21 +01:00
24 lines
567 B
Swift
24 lines
567 B
Swift
//
|
|
// FiatCurrencies.swift
|
|
//
|
|
//
|
|
// Created by ruben on 14/11/2023.
|
|
//
|
|
|
|
import Foundation
|
|
import BreezSDK
|
|
|
|
func listSupportedFiatCurrencies(sdk: BlockingBreezServices) -> [FiatCurrency]? {
|
|
// ANCHOR: list-fiat-currencies
|
|
let supportedFiatCurrencies = try? sdk.listFiatCurrencies()
|
|
// ANCHOR_END: list-fiat-currencies
|
|
return supportedFiatCurrencies
|
|
}
|
|
|
|
func getCurrentRates(sdk:BlockingBreezServices) -> [Rate]? {
|
|
// ANCHOR: fetch-fiat-rates
|
|
let fiatRates = try? sdk.fetchFiatRates()
|
|
// ANCHOR_END: fetch-fiat-rates
|
|
return fiatRates
|
|
}
|