From 3208e89e195ea85e8884d96705cb09e8925a8bad Mon Sep 17 00:00:00 2001 From: Padreug Date: Sun, 3 May 2026 15:51:54 +0200 Subject: [PATCH] Remove orphaned key import/generate UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 3 (auto-provision merchant from account keypair) removed the generateKeys / importKeys methods and the dialog data fields, but left the dialog templates and dropdown menu items behind. They referenced importKeyDialog.show and generateKeyDialog.show, which were now undefined — breaking the merchant dashboard with "Cannot read properties of undefined (reading 'show')". Removes: - The Import Key and Generate New Key dialogs from index.html - The corresponding dropdown items from merchant-tab.html - The 'import-key' and 'generate-key' emits from merchant-tab.js - The dangling @import-key / @generate-key listeners in index.html Merchants are auto-provisioned from the account keypair on first GET; key rotation is handled by the migrate-keys feature instead. Co-Authored-By: Claude Opus 4.6 (1M context) --- static/components/merchant-tab.js | 4 +- .../nostrmarket/components/merchant-tab.html | 19 ----- templates/nostrmarket/index.html | 85 ------------------- 3 files changed, 1 insertion(+), 107 deletions(-) diff --git a/static/components/merchant-tab.js b/static/components/merchant-tab.js index 1194420..8e9588c 100644 --- a/static/components/merchant-tab.js +++ b/static/components/merchant-tab.js @@ -19,9 +19,7 @@ window.app.component('merchant-tab', { 'merchant-deleted', 'toggle-merchant-state', 'restart-nostr-connection', - 'profile-updated', - 'import-key', - 'generate-key' + 'profile-updated' ], data: function () { return { diff --git a/templates/nostrmarket/components/merchant-tab.html b/templates/nostrmarket/components/merchant-tab.html index 3d932d2..5d41ab2 100644 --- a/templates/nostrmarket/components/merchant-tab.html +++ b/templates/nostrmarket/components/merchant-tab.html @@ -67,25 +67,6 @@ - - - - - - - Import Existing Key - Use an existing nsec - - - - - - - - Generate New Key - Create a fresh nsec - - @@ -367,89 +365,6 @@ -
- - - - -
- Import - Cancel -
-
-
-
-
- - - - -
Generate New Key
-
-
Public Key (npub)
- - - -
-
-
- - Private Key (nsec) -
- - - -
- - Never share your private key! -
-
-
- Create Merchant - Cancel -
-
-
{% endblock%}{% block scripts %} {{ window_vars(user) }}