fix: frontend withdraw error message (#3282)
This commit is contained in:
parent
dce2bfb440
commit
01fdc1defb
1 changed files with 4 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue