chore: code format
This commit is contained in:
parent
5d906c1fda
commit
d74776ee93
1 changed files with 16 additions and 12 deletions
|
|
@ -391,7 +391,7 @@
|
||||||
LNbits.utils.notifyApiError(error)
|
LNbits.utils.notifyApiError(error)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
sendTestMessage: async function(){
|
sendTestMessage: async function () {
|
||||||
try {
|
try {
|
||||||
const {data} = await LNbits.api.request(
|
const {data} = await LNbits.api.request(
|
||||||
'PUT',
|
'PUT',
|
||||||
|
|
@ -405,7 +405,10 @@
|
||||||
)
|
)
|
||||||
console.log('### data', data)
|
console.log('### data', data)
|
||||||
this.testData.senderPrivateKey = data.private_key
|
this.testData.senderPrivateKey = data.private_key
|
||||||
this.$q.localStorage.set('lnbits.nostrclient.senderPrivateKey', data.private_key || '')
|
this.$q.localStorage.set(
|
||||||
|
'lnbits.nostrclient.senderPrivateKey',
|
||||||
|
data.private_key || ''
|
||||||
|
)
|
||||||
const event = JSON.parse(data.event_json)[1]
|
const event = JSON.parse(data.event_json)[1]
|
||||||
console.log('### event', event)
|
console.log('### event', event)
|
||||||
this.sendDataToWebSocket(data.event_json)
|
this.sendDataToWebSocket(data.event_json)
|
||||||
|
|
@ -414,14 +417,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
sendDataToWebSocket: async function (data){
|
sendDataToWebSocket: async function (data) {
|
||||||
try {
|
try {
|
||||||
if (!this.testData.wsConnection) {
|
if (!this.testData.wsConnection) {
|
||||||
this.connectToWebsocket()
|
this.connectToWebsocket()
|
||||||
}
|
}
|
||||||
this.testData.wsConnection.send(data)
|
this.testData.wsConnection.send(data)
|
||||||
this.testData.sentData = data + '\n' + this.testData.sentData
|
this.testData.sentData = data + '\n' + this.testData.sentData
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$q.notify({
|
this.$q.notify({
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
|
@ -447,8 +450,7 @@
|
||||||
// const data = JSON.parse(e.data)
|
// const data = JSON.parse(e.data)
|
||||||
console.log('### onclose', e.data)
|
console.log('### onclose', e.data)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
},
|
|
||||||
exportlnurldeviceCSV: function () {
|
exportlnurldeviceCSV: function () {
|
||||||
var self = this
|
var self = this
|
||||||
LNbits.utils.exportCSV(self.relayTable.columns, this.nostrLinks)
|
LNbits.utils.exportCSV(self.relayTable.columns, this.nostrLinks)
|
||||||
|
|
@ -458,7 +460,9 @@
|
||||||
var self = this
|
var self = this
|
||||||
this.getRelays()
|
this.getRelays()
|
||||||
setInterval(this.getRelays, 5000)
|
setInterval(this.getRelays, 5000)
|
||||||
this.testData.senderPrivateKey = this.$q.localStorage.getItem('lnbits.nostrclient.senderPrivateKey') || ''
|
this.testData.senderPrivateKey =
|
||||||
|
this.$q.localStorage.getItem('lnbits.nostrclient.senderPrivateKey') ||
|
||||||
|
''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue