order not logged in - create keypair
This commit is contained in:
parent
d192fd6dfc
commit
e9f37f4a6b
2 changed files with 23 additions and 4 deletions
|
|
@ -80,13 +80,17 @@
|
||||||
</li>
|
</li>
|
||||||
<li>use a Nostr Signer Extension (NIP07)</li>
|
<li>use a Nostr Signer Extension (NIP07)</li>
|
||||||
<li>
|
<li>
|
||||||
fill out the required fields, with your publickey, download
|
generate a key pair to make the order (you should backup up
|
||||||
the order and send as a direct message to the merchant on any
|
your keys)
|
||||||
Nostr client
|
</li>
|
||||||
|
<li>
|
||||||
|
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
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-actions v-if="hasNip07" align="right">
|
<q-card-actions align="right">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="hasNip07"
|
v-if="hasNip07"
|
||||||
unelevated
|
unelevated
|
||||||
|
|
@ -95,6 +99,14 @@
|
||||||
label="Get from Extension"
|
label="Get from Extension"
|
||||||
><q-tooltip>Use a Nostr browser extension</q-tooltip></q-btn
|
><q-tooltip>Use a Nostr browser extension</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
|
<q-btn
|
||||||
|
v-if="!this.account && !this.customerPubkey && !this.customerPrivkey"
|
||||||
|
unelevated
|
||||||
|
@click="generateKeyPair"
|
||||||
|
color="primary"
|
||||||
|
label="Generate Keys"
|
||||||
|
><q-tooltip>Generate a new key pair</q-tooltip></q-btn
|
||||||
|
>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,13 @@ async function customerStall(path) {
|
||||||
this.customerUseExtension = true
|
this.customerUseExtension = true
|
||||||
this.checkoutDialog.data.pubkey = this.customerPubkey
|
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() {
|
openCheckout() {
|
||||||
// Check if user is logged in
|
// Check if user is logged in
|
||||||
if (this.customerPubkey) {
|
if (this.customerPubkey) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue