exchange broker options

This commit is contained in:
Filipriec
2026-08-24 07:03:57 +02:00
parent 7109be803b
commit 2e95201a71
25 changed files with 246 additions and 39 deletions

View File

@@ -40,6 +40,19 @@ pub(crate) async fn load_page(
return Err(LoadError::Forbidden);
}
let mut exchange_rates = state.exchange_rates.clone();
let rate_sources = exchange_rates
.list_rate_sources(
authenticated_request(headers, Empty {}).map_err(|_| LoadError::Unauthenticated)?,
)
.await
.map_err(|error| LoadError::Backend(error.message().to_string()))?
.into_inner()
.sources
.into_iter()
.map(|source| source.id)
.collect();
let mut definitions = state.definitions;
// What a column may be is the backend's to say; the picker and every rule
// the draft applies are read from this.
@@ -135,6 +148,7 @@ pub(crate) async fn load_page(
.into_iter()
.map(|profile| profile.name)
.collect(),
rate_sources,
draft,
status,
error,