Skip to content

Commit

Permalink
Merge a few fixes from kernel #652,#649
Browse files Browse the repository at this point in the history
kernelkind (2):
      log nip05 error
      fix persist deck author profile bug
  • Loading branch information
jb55 committed Jan 20, 2025
3 parents 2901ba8 + 3542717 + a585704 commit 43637f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion crates/notedeck_columns/src/storage/decks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ impl Keyword {
("contact", Keyword::Contact, false),
("explicit", Keyword::Explicit, true),
("deck_author", Keyword::DeckAuthor, false),
("profile", Keyword::Profile, true),
("profile", Keyword::Profile, false),
("hashtag", Keyword::Hashtag, true),
("generic", Keyword::Generic, false),
("thread", Keyword::Thread, true),
Expand Down

0 comments on commit 43637f5

Please sign in to comment.