Streamline access/working with configured params and configured addr (#3219)

This commit is contained in:
holger krekel
2022-04-16 09:50:26 +02:00
committed by GitHub
parent a8a5e184ab
commit 9c04ed483e
18 changed files with 57 additions and 131 deletions

View File

@@ -198,10 +198,7 @@ impl DcSecretKey for SignedSecretKey {
}
async fn generate_keypair(context: &Context) -> Result<KeyPair> {
let addr = context
.get_config(Config::ConfiguredAddr)
.await?
.context("no address configured")?;
let addr = context.get_configured_addr().await?;
let addr = EmailAddress::new(&addr)?;
let _guard = context.generating_key_mutex.lock().await;