fix: frontend withdraw error message (#3282)

This commit is contained in:
dni ⚡ 2025-07-21 09:34:50 +02:00 committed by GitHub
parent dce2bfb440
commit 01fdc1defb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -274,19 +274,18 @@ window.WalletPageLogic = {
if (!this.receive.lnurl) {
this.readNfcTag()
}
// TODO: lnurl_callback and lnurl_response
// WITHDRAW
if (response.data.extra.lnurl_response !== null) {
if (response.data.extra.lnurl_response === false) {
response.data.extra.lnurl_response = `Unable to connect`
}
const domain = this.receive.lnurl.callback.split('/')[2]
if (typeof response.data.extra.lnurl_response === 'string') {
// failure
Quasar.Notify.create({
timeout: 5000,
type: 'warning',
message: `${this.receive.lnurl.domain} lnurl-withdraw call failed.`,
message: `${domain} lnurl-withdraw call failed.`,
caption: response.data.extra.lnurl_response
})
return
@ -294,7 +293,7 @@ window.WalletPageLogic = {
// success
Quasar.Notify.create({
timeout: 3000,
message: `Invoice sent to ${this.receive.lnurl.domain}!`,
message: `Invoice sent to ${domain}!`,
spinner: true
})
}
@ -350,12 +349,11 @@ window.WalletPageLogic = {
)
.then(response => {
const data = response.data
if (data.status === 'ERROR') {
Quasar.Notify.create({
timeout: 5000,
type: 'warning',
message: `${data.domain} lnurl call failed.`,
message: `lnurl scan failed.`,
caption: data.reason
})
return