fix: set merchant after create
This commit is contained in:
parent
2b106a203e
commit
7c15f8ff45
1 changed files with 8 additions and 3 deletions
|
|
@ -20,14 +20,19 @@ const merchant = async () => {
|
||||||
const privkey = nostr.generatePrivateKey()
|
const privkey = nostr.generatePrivateKey()
|
||||||
const pubkey = nostr.getPublicKey(privkey)
|
const pubkey = nostr.getPublicKey(privkey)
|
||||||
|
|
||||||
const data = {private_key: privkey, public_key: pubkey, config: {}}
|
const payload = {private_key: privkey, public_key: pubkey, config: {}}
|
||||||
try {
|
try {
|
||||||
await LNbits.api.request(
|
const {data} = await LNbits.api.request(
|
||||||
'POST',
|
'POST',
|
||||||
'/nostrmarket/api/v1/merchant',
|
'/nostrmarket/api/v1/merchant',
|
||||||
this.g.user.wallets[0].adminkey,
|
this.g.user.wallets[0].adminkey,
|
||||||
data
|
payload
|
||||||
)
|
)
|
||||||
|
this.merchant = data
|
||||||
|
this.$q.notify({
|
||||||
|
type: 'positive',
|
||||||
|
message: 'Keys generated!'
|
||||||
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
LNbits.utils.notifyApiError(error)
|
LNbits.utils.notifyApiError(error)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue