Admin users can credit accounts

This commit is contained in:
Ben Arc
2022-01-31 16:29:42 +00:00
parent f5069f9699
commit dbab181759
14 changed files with 137 additions and 26 deletions
+23
View File
@@ -249,6 +249,29 @@ new Vue({
this.parse.data.paymentChecker = null
this.parse.camera.show = false
},
updateBalance: function(scopeValue){
LNbits.api
.request(
'PUT',
'/api/v1/wallet/balance/' + scopeValue,
this.g.wallet.inkey
)
.catch(err => {
LNbits.utils.notifyApiError(err)
})
.then(response => {
let data = response.data
if (data.status === 'ERROR') {
this.$q.notify({
timeout: 5000,
type: 'warning',
message: `Failed to update.`,
})
return
}
this.balance = this.balance + data.balance
})
},
closeReceiveDialog: function () {
setTimeout(() => {
clearInterval(this.receive.paymentChecker)