Skip to content

Commit

Permalink
fix: Use base32 ID representation
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoh committed Dec 11, 2024
1 parent 53f258d commit 665548a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ impl OkuFs {
.ok()
.flatten()
.ok_or(miette::miette!(
"Prior announcement not found in database for replica {:?} … ",
namespace_id
"Prior announcement not found in database for replica {} … ",
iroh_base::base32::fmt(namespace_id)
))?;

let ticket = mainline::Bytes::from(
Expand Down
4 changes: 2 additions & 2 deletions src/fs/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl OkuFs {
.flatten()
.ok_or(anyhow::anyhow!(
"Missing private key for default author ({}).",
default_author_id.fmt_short()
iroh_base::base32::fmt_short(default_author_id)
))
}

Expand Down Expand Up @@ -92,7 +92,7 @@ impl OkuFs {
.await?;
info!(
"Default author ID is {} … ",
docs_engine.client().authors().default().await?.fmt_short()
iroh_base::base32::fmt_short(docs_engine.client().authors().default().await?)
);

let (replica_sender, _replica_receiver) = watch::channel(());
Expand Down
6 changes: 4 additions & 2 deletions src/fs/replica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ impl OkuFs {
OkuFsError::CannotListReplicas
})?;
pin_mut!(replicas);
let mut replica_ids: Vec<(NamespaceId, CapabilityKind)> =
replicas.map(|replica| replica.unwrap()).collect().await;
let mut replica_ids: Vec<(NamespaceId, CapabilityKind)> = replicas
.filter_map(|replica| async move { replica.ok() })
.collect()
.await;

let config = OkuFsConfig::load_or_create_config()?;
if let Some(home_replica) = config.home_replica()? {
Expand Down

0 comments on commit 665548a

Please sign in to comment.