Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log nip05 error #649

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion crates/notedeck_columns/src/key_parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use ehttp::{Request, Response};
use enostr::{Keypair, Pubkey, SecretKey};
use poll_promise::Promise;
use serde::{Deserialize, Serialize};
use tracing::error;

#[derive(Debug, PartialEq, Clone)]
pub enum AcquireKeyError {
Expand Down Expand Up @@ -104,7 +105,10 @@ fn nip05_promise_wrapper(id: &str) -> Promise<Result<Keypair, AcquireKeyError>>
let result = original_promise.block_and_take();
let transformed_result = match result {
Ok(public_key) => Ok(Keypair::only_pubkey(public_key)),
Err(e) => Err(AcquireKeyError::Nip05Failed(e.to_string())),
Err(e) => {
error!("Nip05 Failed: {e}");
Err(AcquireKeyError::Nip05Failed(e.to_string()))
}
};
sender.send(transformed_result);
});
Expand Down
Loading