From e9f37f4a6bad1f960f216f9fcc7b31f2af6f7cf2 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Fri, 10 Mar 2023 12:03:24 +0000 Subject: [PATCH] order not logged in - create keypair --- .../customer-stall/customer-stall.html | 20 +++++++++++++++---- .../customer-stall/customer-stall.js | 7 +++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/static/components/customer-stall/customer-stall.html b/static/components/customer-stall/customer-stall.html index 750d1e7..2afd57a 100644 --- a/static/components/customer-stall/customer-stall.html +++ b/static/components/customer-stall/customer-stall.html @@ -80,13 +80,17 @@
  • use a Nostr Signer Extension (NIP07)
  • - fill out the required fields, with your publickey, download - the order and send as a direct message to the merchant on any - Nostr client + generate a key pair to make the order (you should backup up + your keys) +
  • +
  • + fill out the required fields and with your public key, + download the order and send as a direct message to the + merchant on any Nostr client
  • - + Use a Nostr browser extension + Generate a new key pair diff --git a/static/components/customer-stall/customer-stall.js b/static/components/customer-stall/customer-stall.js index 8b523b9..d6a114a 100644 --- a/static/components/customer-stall/customer-stall.js +++ b/static/components/customer-stall/customer-stall.js @@ -163,6 +163,13 @@ async function customerStall(path) { this.customerUseExtension = true this.checkoutDialog.data.pubkey = this.customerPubkey }, + async generateKeyPair() { + this.customerPrivkey = NostrTools.generatePrivateKey() + this.customerPubkey = NostrTools.getPublicKey(this.customerPrivkey) + this.customerUseExtension = false + this.checkoutDialog.data.pubkey = this.customerPubkey + this.checkoutDialog.data.privkey = this.customerPrivkey + }, openCheckout() { // Check if user is logged in if (this.customerPubkey) {