Skip to content

Conversation

@AnthonyMarin
Copy link
Member

This pull request introduces several enhancements and refactorings across the codebase, including the integration of the NDK library for handling Nostr-related functionality, improvements to the search and subscriber profile features, and various styling updates. With NDK, we can now search NDKUserProfiles if we don't have the data already. Additionally, some unused components and redundant code have been removed to streamline the project.

NOTE: Make sure you run yarn install before testing

Integration of NDK Library and Nostr Features:

  • Added NDK library and hooks to package.json dependencies for Nostr protocol integration. ([package.jsonR16-R20](https://github.com/HORNET-Storage/HORNETS-Relay-Panel/pull/56/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R16-R20))
  • Integrated NDK instance initialization and connection logic in src/App.tsx. ([src/App.tsxR16-R34](https://github.com/HORNET-Storage/HORNETS-Relay-Panel/pull/56/files#diff-26ad4b834941d9b19ebf9db8082bd202aaf72ea0ddea85f5a8a0cb3c729cc6f2R16-R34))
  • Implemented subscriber profile fetching and validation using NDK in SearchDropdown. Includes handling invalid public keys and fetching additional profile details. (F5061ea2L23R122)

Search and Subscriber Profile Enhancements:

  • Added functionality to search for subscriber profiles by public key in SearchDropdown. Includes modal display for subscriber details and error handling for invalid keys. (F5061ea2L23R122)
  • Removed the unused SubscriberDetailModal component and associated styles. ([[1]](https://github.com/HORNET-Storage/HORNETS-Relay-Panel/pull/56/files#diff-5942fdfcf38f8e2a56ddaf32cb0aae3334be1c4d95a78e4ad2c557bcfa57f645L1-L193), [[2]](https://github.com/HORNET-Storage/HORNETS-Relay-Panel/pull/56/files#diff-8747eb3eb6e51278b19d35a37f6f70556d4b45d4b409cb40b32c1e71285a2569L1-L145), [[3]](https://github.com/HORNET-Storage/HORNETS-Relay-Panel/pull/56/files#diff-751823e8e457e806b5ab9848440672eff8f17318919d457f5c61a50b229ce2f0L1))

@Maphikza
Currently, the dummy profiles are still being used in usePaidSubscribers. If you want to test the PaidSubscriber component, you can swap out the DummyProfiles test data with testSubscribers in usePaidSubscribers.
Also, the search bar only supports hex pubkeys rn. The UI could be improved for the 'invalid pubkey' message, but it's okay for now.

Also sometimes it's hard to click on the Subscribers in the Splide component, but I'm unable to find the cause at this moment.

@AnthonyMarin AnthonyMarin requested a review from Maphikza July 4, 2025 03:32
@AnthonyMarin AnthonyMarin self-assigned this Jul 4, 2025
Copy link
Member

@Maphikza Maphikza left a comment

Choose a reason for hiding this comment

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

I came upon two issues when I tried to build it so that I can test it. The first is, "src/components/relay-dashboard/paid-subscribers/SubscriberDetailModal/SubscriberDetailModal.tsx
Line 46:49: ' can be escaped with ', ‘, ', ’ react/no-unescaped-entities" this was easy to work through but then I got this after that, "/Users/siphiwetapisi/HORNETS-Relay-Panel/src/components/auth/LoginForm/LoginForm.tsx
TypeScript error in /Users/siphiwetapisi/HORNETS-Relay-Panel/src/components/auth/LoginForm/LoginForm.tsx(73,34):
Property 'content' does not exist on type '{ sig: string; }'. TS2339

  71 |   
  72 |         const response = await verifyChallenge({
> 73 |           challenge: signedEvent.content,
     |                                  ^
  74 |           signature: signedEvent.sig,
  75 |           messageHash: signedEvent.id,
  76 |           event: signedEvent," this one is harder. I have no idea what's causing it and it's making it harder to review. did you test login when you were building?

@f7f376a1fcd0d0e11a10ed1b6577c9 f7f376a1fcd0d0e11a10ed1b6577c9 merged commit 3bd9695 into main Jul 4, 2025
2 checks passed
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.

4 participants