Commit graph

499 commits

Author SHA1 Message Date
e8ddc4b697 Refactors type hints for clarity
Some checks failed
CI / lint (push) Has been cancelled
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
Updates type hints in `crud.py`, `helpers.py`, and `models.py` for improved readability and maintainability.

Replaces `Merchant | None` with `Optional[Merchant]` and `list[X]` with `List[X]` for consistency with standard Python typing practices.
2025-11-04 00:59:55 +01:00
429522adba Improves Nostr message handling and error logging
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.
2025-11-04 00:52:36 +01:00
4856bf2f89 Adds order discovery analysis document
Adds a document analyzing the order discovery mechanism in Nostrmarket.

The document identifies the reasons merchants need to manually refresh to see new orders, instead of receiving them automatically. It analyzes timing window issues, connection stability, subscription state management, and event processing delays. It proposes solutions such as enhanced persistent subscriptions, periodic auto-refresh, WebSocket health monitoring, and event gap detection.
2025-11-04 00:48:51 +01:00
725037e669 Enhances websocket connection robustness
Improves websocket connection reliability by predefining the websocket URL and handling potential queueing errors.

This change also updates the websocket close message for clarity.
2025-11-04 00:48:51 +01:00
87a4864c49 Merge branch 'improve-ui' into dev-pm 2025-11-04 00:48:47 +01:00
20a1161e37 TEMP: set merchant active to True by default 2025-11-04 00:47:46 +01:00
0b7639adf5 Improve merchant creation with automatic keypair generation
Enhance the merchant creation process by automatically generating Nostr keypairs
for users who don't have them, and streamline the API interface.

Changes:
- Add CreateMerchantRequest model to simplify merchant creation API
- Auto-generate Nostr keypairs for users without existing keys
- Update merchant creation endpoint to use user account keypairs
- Improve error handling and validation in merchant creation flow
- Clean up frontend JavaScript for merchant creation

This ensures all merchants have proper Nostr keypairs for marketplace
functionality without requiring manual key management from users.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 00:47:46 +01:00
4b65ed411a interactive rebase commit, clean logs 2025-11-04 00:47:43 +01:00
dni ⚡
696cd96288 chore: add uv, add ci, fix some issues (#113)
in preparation of removing secp
2025-10-30 10:11:18 +01:00
PatMulligan
33c62ba1ea CHORE: Improve UI (#112)
* Refactor merchant details layout for improved responsiveness and styling in index.html

* Revamp key pair component layout with improved styling and functionality. Added a header with a toggle for showing the private key, enhanced QR code display for both public and private keys, and included copy buttons for better user interaction.

Update key pair component styling and functionality: adjust QR code dimensions, improve key display format with truncation, and refine button margins for enhanced user experience.

Add 'show-buttons' prop to QR code components in key pair template for improved functionality

Update key pair component layout to use 'col-sm-6' for responsive design of QR code sections, enhancing display on smaller screens.

* Enhance direct messages component layout with improved styling and responsiveness. Updated class names for better alignment, added ellipsis for long customer labels, and modified button styles for consistency. Improved select options display with custom templates for better user experience.

* Refactor customer label generation in direct messages component for improved readability. Added checks for undefined customer data, enhanced label formatting with truncation for long descriptions, and adjusted unread message display format.

* make format
2025-09-15 09:48:13 +03:00
PatMulligan
d43a3b196c FIX: add urlsafe=True (#111) 2025-09-10 15:10:45 +03:00
f806faec51 FIX: add urlsafe=True 2025-09-03 10:54:28 +02:00
39f0153f9b add DEBUG logs 2025-09-03 10:54:07 +02:00
Vlad Stan
0fc26d096f V1 (#106) 2024-11-06 11:50:21 +02:00
rleed
83c94e94db Changes to deactivate/reactivate products (#89) 2024-11-04 10:59:04 +02:00
PatMulligan
cf82ed478d pass showKeys as prop to merchant-details child and use emit to toggle (#105)
previously, index and its child compoment merchant-details had their own
booleans and their values were not synched. Using a prop avoids this
problem
2024-10-25 15:19:13 +03:00
Arc
8efcd07203 Merge pull request #104 from lnbits/arcbtc-patch-1
slight path change
2024-08-11 10:59:10 +01:00
Arc
66aaa3b8e0 slight path change 2024-08-11 10:58:59 +01:00
Arc
b17a9827e3 Merge pull request #101 from lnbits/advanceddescription
Added advanced description
2024-06-19 17:46:49 +01:00
dni ⚡
6289d2d36a fix: properly start/stop tasks (#100)
* fix: properly start/stop tasks

https://github.com/lnbits/lnbits/issues/2411
2024-05-27 12:47:39 +03:00
benarc
01f5f28739 Added advanced description 2024-05-15 11:23:49 +01:00
dni ⚡
2ce0c98a76 chore: rename websocketUpdater (#99)
* chore: rename `websocketUpdater`
https://github.com/lnbits/lnbits/pull/2377
2024-04-12 12:12:19 +02:00
Vlad Stan
91e42ee686 Use private realay enpoint (#97)
* feat: use private ws endpoint

* chore: bump `min_lnbits_version`

* fix: retry logic

* fix: restart logic

* chore: fux log message
2024-01-22 13:50:40 +02:00
Vlad Stan
55624cc2b5 fix: colours (#92) 2023-11-08 15:33:31 +02:00
Vlad Stan
751271eb65 fix: long product name in order details 2023-11-06 12:41:53 +02:00
Vlad Stan
8ab688dc41 fix: better handling of WS close 2023-11-01 15:04:10 +02:00
dni ⚡
39fd743d89 release workflow (#87) 2023-09-29 09:55:41 +02:00
Tiago Vasconcelos
3aa34bc5bf allow custom path (#83)
* allow custom path

* fix: update min_lnbits_version to 0.11.0

---------

Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
2023-09-26 15:30:49 +03:00
Vlad Stan
87a3701d79 fix: receipt on invoice re-issue 2023-09-26 14:32:46 +03:00
Vlad Stan
954deb8c45 chore: update market binaries 2023-09-21 17:37:17 +03:00
Vlad Stan
5c83bf8972 Custom shipping cost (#86)
* feat: simple UI for shipping zone per product

* feat: add empty cost

* fix: backwards compatible zones

* feat: finish UI for product shipping cost

* fix: some ui issues

* feat: add per product shipping cost

* feat: show receipt for product

* fix: publish per product shipping cost
2023-09-21 17:29:13 +03:00
Vlad Stan
2dc5c5479f feat: refresh merchant from nostr (#85) 2023-09-20 12:06:36 +03:00
Vlad Stan
656723ed5e chore: market UI update 2023-09-20 09:17:40 +03:00
Vlad Stan
c073bf55c9 Fix high load (#84)
* chore: testing

* fix: resubscribe when merchant added/removed

* chore: code clean-up

* fix: temp subscribe when new merchant is added

* fix: new customer profile
2023-09-20 09:17:01 +03:00
Vlad Stan
c0226fe85b chore: update mrket app 2023-09-15 18:30:48 +03:00
Vlad Stan
734a09795d chore: update market binaries 2023-09-15 17:51:54 +03:00
Vlad Stan
7e71e7d169 chore: update market binaries 2023-09-15 15:25:02 +03:00
Vlad Stan
1a3fc62106 feat: add auto-reply on payment (#82) 2023-09-15 10:21:03 +03:00
Vlad Stan
d26ff891ce fix: import after core refactoring 2023-09-13 09:55:40 +03:00
Vlad Stan
926f940b46 chore: code clean-up 2023-09-12 15:05:41 +03:00
Vlad Stan
889152a80b Fix subscription errors (#81)
* pref: merge filters in one

* chore: load nit

* feat: restore individual order
2023-09-12 15:03:37 +03:00
Vlad Stan
a3299b63c4 Extract market place (#78)
* chore: remove marketplace components

* feat: add static marketplace

* feat: add entry point for static marketplace

* doc: add comment

* chore: include nostr-bundle.js
2023-07-31 11:35:50 +03:00
Vlad Stan
8ebe2fe458 chore: code clean-up 2023-07-24 11:11:31 +02:00
Vlad Stan
e1fd62400d refactor: stuff 2023-07-24 11:11:31 +02:00
Vlad Stan
f41a502d3b fix: update product list when product deleted 2023-07-24 11:11:31 +02:00
Vlad Stan
ee3b161b47 feat: add readNotes and clearAllData option 2023-07-24 11:11:31 +02:00
Vlad Stan
bb2d68d7dc fix: why even optimize 2023-07-24 11:11:31 +02:00
Vlad Stan
388a32bc47 feat: add intro info 2023-07-18 16:40:43 +02:00
Vlad Stan
091d3cf5d9 chore: code clean-up 2023-07-18 16:40:43 +02:00
Vlad Stan
97cc7a3e17 feat: user logout and data clear 2023-07-18 16:40:43 +02:00