fix: do not allow two merchants with the same public key

This commit is contained in:
Vlad Stan 2023-03-16 09:56:30 +02:00
parent b2f5f519c3
commit 3794eac915
3 changed files with 13 additions and 6 deletions

View file

@ -342,8 +342,9 @@ async function customerStall(path) {
let json = JSON.parse(text)
if (json.id != this.activeOrder) return
if (json.payment_options) {
let payment_request = json.payment_options.find(o => o.type == 'ln')
.link
let payment_request = json.payment_options.find(
o => o.type == 'ln'
).link
if (!payment_request) return
this.loading = false
this.qrCodeDialog.data.payment_request = payment_request

View file

@ -78,10 +78,7 @@ const merchant = async () => {
message: 'Merchant Created!'
})
} catch (error) {
this.$q.notify({
type: 'negative',
message: `${error}`
})
LNbits.utils.notifyApiError(error)
}
},
getMerchant: async function () {