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

Fix login #4

Closed
wants to merge 7 commits into from
Closed

Fix login #4

wants to merge 7 commits into from

Conversation

sectore
Copy link
Contributor

@sectore sectore commented Jan 26, 2024

Update to latest nostr 0.27.0 fixes login.

BEFORE:

ngit login -n nsec...
searching for your details...
Error: metadata cannot be found in kind 0 event content

Caused by:
    Json: invalid type: integer `1696173913`, expected a string at line 1 column 463

NOW:

ngit login -n nsec...
logged in as XXX

Fixes #3

Note: Due some timeouts I've disabled tests in pre-push hook.

Comment on lines 18 to 22
# if ! cargo test
# then
# echo "There are some test issues."
# exit 1
# fi

This comment was marked as outdated.

@@ -207,8 +207,7 @@ mod with_relays {
fn when_some_relays_return_other_event_kinds() -> Result<()> {
futures::executor::block_on(run_test_displays_correct_name(
Some(&|relay, client_id, subscription_id, _| -> Result<()> {
let mut event = generate_test_key_1_metadata_event("Fred");
event.kind = nostr::Kind::TextNote;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

event.kind cannot be assigned anymore

Comment on lines +112 to +117
// FIXME:
// `filter.match_events` does not exist anymore
// it has been moved to `nostr_database_::FilterIndex`
// but it's private now
// .filter(|e| filters.iter().any(|filter|filter.match_event(e)))
.filter(|_| true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

match_events and other functions have been moved from Filter to nostr_database_::FilterIndex - see rust-nostr/nostr@2439a3d

Unfortunately match_events is private now.


#[allow(clippy::struct_field_names)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clippy: warning: field name starts with the struct's name implied by #[warn(clippy::pedantic)]

@DanConwayDev
Copy link
Owner

Thanks for contributing! I'll take a look.

@DanConwayDev
Copy link
Owner

Thanks for your contribution. I rebased and squashed you changes onto fc3f22e.

@DanConwayDev
Copy link
Owner

let me know if you still have issue reoccurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stuck on searching for your details...
2 participants