diff --git a/lnbits/static/js/wallet.js b/lnbits/static/js/wallet.js index eeb308de..d613770d 100644 --- a/lnbits/static/js/wallet.js +++ b/lnbits/static/js/wallet.js @@ -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