Enhances the processing of Nostr messages by adding more robust error handling and logging, providing better insights into potential issues.
Specifically:
- Improves the checks on the websocket connection to log errors and debug information.
- Implements more comprehensive error logging for failed product quantity checks.
- Enhances logging and validation of EVENT messages to prevent potential errors.
- Implements a more robust merchant lookup logic to avoid double processing of events.
- Implements a more lenient time window for direct message subscriptions.
Improves websocket connection reliability by predefining the websocket URL and handling potential queueing errors.
This change also updates the websocket close message for clarity.
* feat: restore stalls from `nostr` as pending
* feat: stall and prod last update time
* feat: restore products and stalls as `pending`
* feat: show pending stalls
* feat: restore stall
* feat: restore a stall from nostr
* feat: add blank `Restore Product` button
* fix: handle no talls to restore case
* feat: show restore dialog
* feat: allow query for pending products
* feat: restore products
* chore: code clean-up
* fix: last dm and last order query
* chore: code clean-up
* fix: subscribe for stalls and products on merchant create/restore
* feat: add message type to orders
* feat: simplify messages; code format
* feat: add type to DMs; restore DMs from nostr
* fix: parsing ints
* fix: hide copy button if invoice not present
* fix: do not generate invoice if product not found
* feat: order restore: first version
* refactor: move some logic into `services`
* feat: improve restore UX
* fix: too many calls to customer DMs
* fix: allow `All` customers filter
* fix: ws reconnect on server restart
* fix: query for customer profiles only one
* fix: unread messages per customer per merchant
* fix: disable `user-profile-events`
* fix: customer profile is optional
* fix: get customers after new message debounced
* chore: code clean-up
* feat: auto-create zone
* feat: fixed ID for default zone
* feat: notify order paid